mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-04 12:40:58 -06:00
Fracture Model: use slider for measured depth
This commit is contained in:
parent
46a47eb8d5
commit
caa4fdc538
@ -109,6 +109,7 @@ RimFractureModel::RimFractureModel()
|
||||
m_editFractureModelTemplate.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
|
||||
CAF_PDM_InitScriptableField( &m_MD, "MD", 0.0, "MD", "", "", "" );
|
||||
m_MD.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
|
||||
|
||||
CAF_PDM_InitScriptableField( &m_extractionType,
|
||||
"ExtractionType",
|
||||
@ -790,6 +791,27 @@ void RimFractureModel::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
doubleAttr->m_numberFormat = caf::PdmUiDoubleValueEditorAttribute::NumberFormat::FIXED;
|
||||
}
|
||||
}
|
||||
|
||||
if ( field == &m_MD )
|
||||
{
|
||||
caf::PdmUiDoubleSliderEditorAttribute* myAttr = dynamic_cast<caf::PdmUiDoubleSliderEditorAttribute*>( attribute );
|
||||
|
||||
if ( myAttr )
|
||||
{
|
||||
RimWellPath* rimWellPath = nullptr;
|
||||
this->firstAncestorOrThisOfType( rimWellPath );
|
||||
if ( !rimWellPath ) return;
|
||||
|
||||
RigWellPath* wellPathGeo = rimWellPath->wellPathGeometry();
|
||||
if ( !wellPathGeo ) return;
|
||||
|
||||
if ( wellPathGeo->m_measuredDepths.size() > 1 )
|
||||
{
|
||||
myAttr->m_minimum = wellPathGeo->m_measuredDepths.front();
|
||||
myAttr->m_maximum = wellPathGeo->m_measuredDepths.back();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user