mirror of
https://github.com/OPM/ResInsight.git
synced 2026-08-26 21:27:15 -05:00
#14555 Make sure views in a grid ensemble are updated when a grid calculation is evaluated
A case in a grid ensemble is displayed by views in the view collection of the grid ensemble, but RimEclipseCase::reservoirViews() only inspected the view collection of the case itself and the global view collection. No views were found for such a case, so the display model was never rebuilt after a grid calculation was evaluated. When loading a project file, the view was left with the display model created before the calculation was evaluated, showing no legend and no cell colors.
This commit is contained in:
@@ -1406,6 +1406,13 @@ std::vector<RimEclipseView*> RimEclipseCase::reservoirViews() const
|
||||
|
||||
addViewsFromViewCollection( views, viewCollection() );
|
||||
addViewsFromViewCollection( views, globalViewCollection() );
|
||||
|
||||
// A case in a grid ensemble is displayed by views in the view collection of the grid ensemble
|
||||
if ( auto gridEnsemble = firstAncestorOrThisOfType<RimReservoirGridEnsemble>() )
|
||||
{
|
||||
addViewsFromViewCollection( views, gridEnsemble->viewCollection() );
|
||||
}
|
||||
|
||||
return views;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user