#4900 Align name and icon of linked views with ordinary views

This commit is contained in:
Jacob Støren 2019-10-18 15:11:57 +02:00
parent ab190fce8b
commit d8a8a615a8

View File

@ -286,12 +286,7 @@ QString RimViewLinker::displayNameForView( RimGridView* view )
if ( view )
{
RimCase* rimCase = nullptr;
view->firstAncestorOrThisOfType( rimCase );
if ( rimCase )
{
displayName = rimCase->caseUserDescription() + ": " + view->name();
}
displayName = view->autoName();
}
return displayName;
@ -437,29 +432,8 @@ void RimViewLinker::findNameAndIconFromView( QString* name, caf::QIconProvider*
CVF_ASSERT( name && icon );
*name = displayNameForView( view );
*icon = view->uiIconProvider();
if ( view )
{
RimCase* rimCase = nullptr;
view->firstAncestorOrThisOfType( rimCase );
if ( dynamic_cast<RimGeoMechCase*>( rimCase ) )
{
*icon = caf::QIconProvider( ":/GeoMechCase48x48.png" );
}
else if ( dynamic_cast<RimEclipseResultCase*>( rimCase ) )
{
*icon = caf::QIconProvider( ":/Case48x48.png" );
}
else if ( dynamic_cast<RimEclipseInputCase*>( rimCase ) )
{
*icon = caf::QIconProvider( ":/EclipseInput48x48.png" );
}
}
else
{
*icon = caf::QIconProvider();
}
}
//--------------------------------------------------------------------------------------------------