Refactor connection between cases and views.

Eclipse grid views and contour maps are not longer a child of the case.
The views are not separate collections (one for grid and one for contour maps)
on root level.
This commit is contained in:
Kristian Bendiksen
2024-03-15 09:32:45 +01:00
parent 8f96d8b131
commit b5666c333a
57 changed files with 626 additions and 286 deletions

View File

@@ -31,6 +31,7 @@
#include "RigHexIntersectionTools.h"
#include "RigMainGrid.h"
#include "Rim3dView.h"
#include "RimEclipseCase.h"
#include "RimEclipseCellColors.h"
#include "RimEclipseContourMapView.h"
@@ -385,7 +386,10 @@ std::vector<double> RimEclipseContourMapProjection::retrieveParameterWeights()
//--------------------------------------------------------------------------------------------------
RimEclipseCase* RimEclipseContourMapProjection::eclipseCase() const
{
return firstAncestorOrThisOfType<RimEclipseCase>();
auto view = firstAncestorOrThisOfType<Rim3dView>();
if ( !view ) return nullptr;
return dynamic_cast<RimEclipseCase*>( view->ownerCase() );
}
//--------------------------------------------------------------------------------------------------