#6877 Fix backwards compatibility for well path/fracture intersection depth.

The value needs to be copied from the template to the fracture instance for old
projects. This fixes assert seen in regression tests.
This commit is contained in:
Kristian Bendiksen 2021-01-27 11:10:00 +01:00 committed by Magne Sjaastad
parent 1bacd41037
commit acd78daa3f
2 changed files with 20 additions and 0 deletions

View File

@ -918,3 +918,22 @@ const RigFractureGrid* RimFracture::fractureGrid() const
{
return m_fractureGrid.p();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimFracture::initAfterRead()
{
if ( RimProject::current()->isProjectFileVersionEqualOrOlderThan( "2020.10.2" ) )
{
if ( m_fractureTemplate() )
{
RimStimPlanFractureTemplate* stimPlanFracTemplate =
dynamic_cast<RimStimPlanFractureTemplate*>( m_fractureTemplate() );
if ( stimPlanFracTemplate )
{
m_wellPathDepthAtFracture = stimPlanFracTemplate->wellPathDepthAtFracture();
}
}
}
}

View File

@ -143,6 +143,7 @@ protected:
void defineEditorAttribute( const caf::PdmFieldHandle* field,
QString uiConfigName,
caf::PdmUiEditorAttribute* attribute ) override;
void initAfterRead();
private:
cvf::Vec3d fracturePositionForUi() const;