Move Reference Well functionality to WellLogExtractionCurve

* Remove reference well feature from plot objects
* Move Reference Well functionality to WellLogExtractionCurve
* Reset reference well selection if new selected well path equals ref
This commit is contained in:
Jørgen Herje
2023-01-23 15:07:48 +01:00
committed by GitHub
parent f48eca9ef5
commit 632107e77c
9 changed files with 30 additions and 135 deletions

View File

@@ -57,15 +57,6 @@ RimWellLogCurve::RimWellLogCurve()
m_curveDataPropertyValueRange =
std::make_pair( std::numeric_limits<double>::infinity(), -std::numeric_limits<double>::infinity() );
// Ref well path as Ui element for debug purpose. If not needed: Remove use of caf::PdmPtrField,
// and replace with regular non-ui ptr. The remove related code in calculateValueOptions() and
// defineUiOrdering().
CAF_PDM_InitFieldNoDefault( &m_refWellPath, "ReferenceWellPath", "Reference Well Path" );
m_refWellPath.uiCapability()->setUiHidden( !RiaApplication::enableDevelopmentFeatures() );
m_refWellPath.uiCapability()->setUiReadOnly( true );
CAF_PDM_InitField( &m_useRefWell, "UseReferenceWellPath", true, "Use Reference Well Path" );
setDeletable( true );
}
@@ -234,24 +225,6 @@ const RigWellLogCurveData* RimWellLogCurve::curveData() const
return m_curveData.p();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogCurve::setReferenceWellPath( RimWellPath* refWellPath )
{
m_refWellPath = refWellPath;
if ( m_refWellPath == nullptr )
{
m_useRefWell.uiCapability()->setUiHidden( true );
m_useRefWell = true;
}
else
{
m_useRefWell.uiCapability()->setUiHidden( false );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -439,37 +412,6 @@ void RimWellLogCurve::calculateCurveDataPropertyValueRange()
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QList<caf::PdmOptionItemInfo> RimWellLogCurve::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions )
{
auto options = RimStackablePlotCurve::calculateValueOptions( fieldNeedingOptions );
if ( fieldNeedingOptions == &m_refWellPath )
{
options.push_back( caf::PdmOptionItemInfo( QString( "None" ), nullptr ) );
RimTools::wellPathOptionItems( &options );
}
return options;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogCurve::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
{
RimStackablePlotCurve::defineUiOrdering( uiConfigName, uiOrdering );
auto group = uiOrdering.findGroup( "DataSource" );
if ( group != nullptr )
{
group->add( &m_refWellPath );
group->add( &m_useRefWell );
}
uiOrdering.skipRemainingFields( true );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -491,12 +433,6 @@ void RimWellLogCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
{
loadDataAndUpdate( true );
}
if ( changedField == &m_useRefWell )
{
loadDataAndUpdate( true );
updateConnectedEditors();
}
}
//--------------------------------------------------------------------------------------------------