Fix intersection view regression.

This commit is contained in:
Kristian Bendiksen authored and Magne Sjaastad committed 2024-04-16 15:23:53 +02:00
1 parent 030688cff6
commit abf61090cc
2 files changed
+10 -5

No files matched your search

@@ -72,7 +72,12 @@ void RimIntersectionResultsDefinitionCollection::appendIntersectionResultDefinit
if ( interResDef->activeCase() == nullptr ) if ( interResDef->activeCase() == nullptr )
{ {
if ( auto gridView = firstAncestorOrThisOfType<Rim3dView>() ) auto ownerCase = firstAncestorOrThisOfType<RimCase>();
if ( ownerCase )
{
interResDef->setActiveCase( ownerCase );
}
else if ( auto gridView = firstAncestorOrThisOfType<Rim3dView>() )
{ {
if ( auto ownerCase = gridView->ownerCase() ) if ( auto ownerCase = gridView->ownerCase() )
{ {
@@ -176,7 +176,7 @@ RimCase* Rim2dIntersectionView::ownerCase() const
if ( !rimCase ) if ( !rimCase )
{ {
rimCase = firstAncestorOrThisOfTypeAsserted<Rim3dView>()->ownerCase(); rimCase = firstAncestorOrThisOfType<RimCase>();
} }
return rimCase; return rimCase;
@@ -258,7 +258,7 @@ void Rim2dIntersectionView::update3dInfo()
} }
} }
if ( overlayInfoConfig->showCaseInfo() ) if ( overlayInfoConfig->showCaseInfo() && ownerCase() )
{ {
overlayInfoText += "<b>--" + ownerCase()->caseUserDescription() + "--</b>"; overlayInfoText += "<b>--" + ownerCase()->caseUserDescription() + "--</b>";
} }
@@ -467,7 +467,7 @@ bool Rim2dIntersectionView::hasResults()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
size_t Rim2dIntersectionView::onTimeStepCountRequested() size_t Rim2dIntersectionView::onTimeStepCountRequested()
{ {
if ( isTimeStepDependentDataVisible() ) if ( isTimeStepDependentDataVisible() && ownerCase() )
{ {
return ownerCase()->timeStepStrings().size(); return ownerCase()->timeStepStrings().size();
} }
@@ -557,7 +557,7 @@ void Rim2dIntersectionView::onCreateDisplayModel()
if ( m_intersection->type() == RimExtrudedCurveIntersection::CrossSectionEnum::CS_WELL_PATH && m_intersection->wellPath() ) if ( m_intersection->type() == RimExtrudedCurveIntersection::CrossSectionEnum::CS_WELL_PATH && m_intersection->wellPath() )
{ {
Rim3dView* settingsView = m_intersection->firstAncestorOrThisOfType<Rim3dView>(); Rim3dView* settingsView = m_intersection->firstAncestorOrThisOfType<Rim3dView>();
if ( settingsView ) if ( settingsView && ownerCase() )
{ {
m_flatWellpathPartMgr = new RivWellPathPartMgr( m_intersection->wellPath(), settingsView ); m_flatWellpathPartMgr = new RivWellPathPartMgr( m_intersection->wellPath(), settingsView );
m_flatWellpathPartMgr->appendFlattenedStaticGeometryPartsToModel( m_intersectionVizModel.p(), m_flatWellpathPartMgr->appendFlattenedStaticGeometryPartsToModel( m_intersectionVizModel.p(),