diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimFractureTemplate.cpp b/ApplicationLibCode/ProjectDataModel/Completions/RimFractureTemplate.cpp index b57d2474e8..7f8591c101 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimFractureTemplate.cpp +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimFractureTemplate.cpp @@ -366,12 +366,7 @@ void RimFractureTemplate::fieldChangedByUi( const caf::PdmFieldHandle* changedFi if ( createDisplayModelAndRedraw ) { - RimProject* proj; - this->firstAncestorOrThisOfType( proj ); - if ( proj ) - { - proj->reloadCompletionTypeResultsInAllViews(); - } + RimProject::current()->reloadCompletionTypeResultsInAllViews(); } } @@ -806,12 +801,7 @@ void RimFractureTemplate::disconnectAllFracturesAndRedrawViews() const } } - RimProject* proj; - this->firstAncestorOrThisOfType( proj ); - if ( proj ) - { - proj->scheduleCreateDisplayModelAndRedrawAllViews(); - } + RimProject::current()->scheduleCreateDisplayModelAndRedrawAllViews(); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimWellPathFracture.cpp b/ApplicationLibCode/ProjectDataModel/Completions/RimWellPathFracture.cpp index 75dd0b56aa..38d5c1cd6e 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimWellPathFracture.cpp +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimWellPathFracture.cpp @@ -82,9 +82,7 @@ void RimWellPathFracture::fieldChangedByUi( const caf::PdmFieldHandle* changedFi updatePositionFromMeasuredDepth(); updateAzimuthBasedOnWellAzimuthAngle(); - RimProject* proj = nullptr; - this->firstAncestorOrThisOfType( proj ); - if ( proj ) proj->reloadCompletionTypeResultsInAllViews(); + RimProject::current()->reloadCompletionTypeResultsInAllViews(); } } @@ -242,9 +240,7 @@ void RimWellPathFracture::defineUiOrdering( QString uiConfigName, caf::PdmUiOrde { uiOrdering.add( nameField() ); { - RimProject* project = nullptr; - this->firstAncestorOrThisOfTypeAsserted( project ); - if ( project->allFractureTemplates().empty() ) + if ( RimProject::current()->allFractureTemplates().empty() ) { uiOrdering.add( &m_createEllipseFractureTemplate ); uiOrdering.add( &m_createStimPlanFractureTemplate, false );