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

@@ -83,7 +83,6 @@ RimWellLogCurveCommonDataSource::RimWellLogCurveCommonDataSource()
CAF_PDM_InitFieldNoDefault( &m_trajectoryType, "TrajectoryType", "Trajectory Type" );
CAF_PDM_InitFieldNoDefault( &m_wellPath, "CurveWellPath", "Well Path" );
CAF_PDM_InitFieldNoDefault( &m_refWellPath, "CurveReferenceWellPath", "Reference Well Path" );
CAF_PDM_InitFieldNoDefault( &m_simWellName, "SimulationWellName", "Well Name" );
CAF_PDM_InitFieldNoDefault( &m_branchDetection,
@@ -112,9 +111,8 @@ RimWellLogCurveCommonDataSource::RimWellLogCurveCommonDataSource()
CAF_PDM_InitFieldNoDefault( &m_rftSegmentBranchIndex, "SegmentBranchIndex", "RFT Branch" );
CAF_PDM_InitFieldNoDefault( &m_rftSegmentBranchType, "SegmentBranchType", "RFT Completion" );
m_case = nullptr;
m_wellPath = nullptr;
m_refWellPath = nullptr;
m_case = nullptr;
m_wellPath = nullptr;
}
//--------------------------------------------------------------------------------------------------
@@ -189,14 +187,6 @@ void RimWellLogCurveCommonDataSource::setWellPathToApply( RimWellPath* val )
m_wellPath = val;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellPath* RimWellLogCurveCommonDataSource::referenceWellPathToApply() const
{
return m_refWellPath;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -848,10 +838,6 @@ void RimWellLogCurveCommonDataSource::fieldChangedByUi( const caf::PdmFieldHandl
RimWellLogPlot* parentPlot = nullptr;
this->firstAncestorOrThisOfType( parentPlot );
if ( changedField == &m_wellPath && m_wellPath() == m_refWellPath() )
{
m_refWellPath = nullptr;
}
if ( changedField == &m_branchDetection && m_branchDetection().isPartiallyTrue() )
{
// The Tristate is cycled from false -> partially true -> true
@@ -944,11 +930,6 @@ QList<caf::PdmOptionItemInfo>
}
}
}
else if ( fieldNeedingOptions == &m_refWellPath )
{
options.push_back( caf::PdmOptionItemInfo( QString( "None" ), nullptr ) );
RimTools::wellPathOptionItemsSubset( { m_wellPath() }, &options );
}
else if ( fieldNeedingOptions == &m_timeStep )
{
if ( m_case() )
@@ -1053,7 +1034,6 @@ void RimWellLogCurveCommonDataSource::defineUiOrdering( QString uiConfigName, ca
if ( trajectoryTypeToApply() == RimWellLogExtractionCurve::WELL_PATH )
{
group->add( &m_wellPath );
group->add( &m_refWellPath );
}
else if ( trajectoryTypeToApply() == RimWellLogExtractionCurve::SIMULATION_WELL )
{
@@ -1080,7 +1060,6 @@ void RimWellLogCurveCommonDataSource::defineUiOrdering( QString uiConfigName, ca
else
{
if ( m_wellPath() ) group->add( &m_wellPath );
group->add( &m_refWellPath );
}
if ( uiConfigName == smoothingUiOrderinglabel() )
@@ -1108,8 +1087,8 @@ void RimWellLogCurveCommonDataSource::defineEditorAttribute( const caf::PdmField
if ( myAttr )
{
if ( field == &m_case || field == &m_summaryCase || field == &m_simWellName || field == &m_wellPath ||
field == &m_refWellPath || field == &m_timeStep || field == &m_rftTimeStep ||
field == &m_rftSegmentBranchIndex || field == &m_rftWellName )
field == &m_timeStep || field == &m_rftTimeStep || field == &m_rftSegmentBranchIndex ||
field == &m_rftWellName )
{
myAttr->showPreviousAndNextButtons = true;
myAttr->nextIcon = QIcon( ":/ComboBoxDown.svg" );