mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user