Fix intersection view regression.

This commit is contained in:
Kristian Bendiksen 2024-04-16 12:55:06 +02:00 committed by Magne Sjaastad
parent 030688cff6
commit abf61090cc
2 changed files with 10 additions and 5 deletions

View File

@ -72,7 +72,12 @@ void RimIntersectionResultsDefinitionCollection::appendIntersectionResultDefinit
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() )
{

View File

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