#7953 StimPlan Model: always recompute anchor position and thickness direction. (#8004)

This is to support manually changing the MD directly in the project file.

Fixes #7953.
This commit is contained in:
Kristian Bendiksen 2021-09-14 10:46:12 +02:00 committed by GitHub
parent 1df25ed71c
commit cd91a96871
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 0 deletions

View File

@ -665,6 +665,12 @@ bool RiaApplication::loadProject( const QString& projectFileName,
}
oilField->annotationCollection()->loadDataAndUpdate();
for ( auto well : oilField->wellPathCollection()->allWellPaths() )
{
for ( auto stimPlan : well->stimPlanModelCollection()->allStimPlanModels() )
stimPlan->resetAnchorPositionAndThicknessDirection();
}
}
// Some procedures in onProjectOpened() may rely on the display model having been created

View File

@ -173,9 +173,11 @@ RimStimPlanModel::RimStimPlanModel()
CAF_PDM_InitScriptableFieldNoDefault( &m_anchorPosition, "AnchorPosition", "Anchor Position", "", "", "" );
m_anchorPosition.uiCapability()->setUiReadOnly( true );
m_anchorPosition.xmlCapability()->disableIO();
CAF_PDM_InitScriptableFieldNoDefault( &m_thicknessDirection, "ThicknessDirection", "Thickness Direction", "", "", "" );
m_thicknessDirection.uiCapability()->setUiReadOnly( true );
m_thicknessDirection.xmlCapability()->disableIO();
CAF_PDM_InitScriptableFieldNoDefault( &m_thicknessDirectionWellPath,
"ThicknessDirectionWellPath",
@ -922,6 +924,17 @@ void RimStimPlanModel::loadDataAndUpdate()
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimStimPlanModel::resetAnchorPositionAndThicknessDirection()
{
// Always recompute thickness direction as MD in project file might have been changed
updatePositionFromMeasuredDepth();
updateThicknessDirection();
updateBarrierProperties();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -153,6 +153,7 @@ public:
RimWellPath* wellPath() const;
void loadDataAndUpdate();
void resetAnchorPositionAndThicknessDirection();
RimModeledWellPath* thicknessDirectionWellPath() const;
void setThicknessDirectionWellPath( RimModeledWellPath* thicknessDirectionWellPath );