mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
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:
@@ -656,7 +656,7 @@ void RimBoxIntersection::switchSingelPlaneState()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::BoundingBox RimBoxIntersection::currentCellBoundingBox()
|
||||
{
|
||||
auto rimCase = firstAncestorOrThisOfTypeAsserted<RimCase>();
|
||||
auto rimCase = firstAncestorOrThisOfTypeAsserted<Rim3dView>()->ownerCase();
|
||||
|
||||
return rimCase->activeCellsBoundingBox();
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ void RimIntersectionCollection::appendIntersectionNoUpdate( RimExtrudedCurveInte
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::synchronize2dIntersectionViews()
|
||||
{
|
||||
auto ownerCase = firstAncestorOrThisOfTypeAsserted<RimCase>();
|
||||
auto ownerCase = firstAncestorOrThisOfTypeAsserted<Rim3dView>()->ownerCase();
|
||||
ownerCase->intersectionViewCollection()->syncFromExistingIntersections( true );
|
||||
}
|
||||
|
||||
|
||||
@@ -72,8 +72,13 @@ void RimIntersectionResultsDefinitionCollection::appendIntersectionResultDefinit
|
||||
|
||||
if ( interResDef->activeCase() == nullptr )
|
||||
{
|
||||
auto ownerCase = firstAncestorOrThisOfType<RimCase>();
|
||||
interResDef->setActiveCase( ownerCase );
|
||||
if ( auto gridView = firstAncestorOrThisOfType<Rim3dView>() )
|
||||
{
|
||||
if ( auto ownerCase = gridView->ownerCase() )
|
||||
{
|
||||
interResDef->setActiveCase( ownerCase );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user