#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:
Magne Sjaastad
2026-08-21 14:53:48 +02:00
parent 6022980d54
commit 2a35edcca9
@@ -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;
}