mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4900 Align name and icon of linked views with ordinary views
This commit is contained in:
parent
ab190fce8b
commit
d8a8a615a8
@ -286,12 +286,7 @@ QString RimViewLinker::displayNameForView( RimGridView* view )
|
|||||||
|
|
||||||
if ( view )
|
if ( view )
|
||||||
{
|
{
|
||||||
RimCase* rimCase = nullptr;
|
displayName = view->autoName();
|
||||||
view->firstAncestorOrThisOfType( rimCase );
|
|
||||||
if ( rimCase )
|
|
||||||
{
|
|
||||||
displayName = rimCase->caseUserDescription() + ": " + view->name();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return displayName;
|
return displayName;
|
||||||
@ -437,29 +432,8 @@ void RimViewLinker::findNameAndIconFromView( QString* name, caf::QIconProvider*
|
|||||||
CVF_ASSERT( name && icon );
|
CVF_ASSERT( name && icon );
|
||||||
|
|
||||||
*name = displayNameForView( view );
|
*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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user