#5110 Update well measurement plots when WBS well is changed.

This commit is contained in:
Kristian Bendiksen 2019-12-03 21:14:32 +01:00
parent 12abf6494f
commit cf15beb808
2 changed files with 12 additions and 17 deletions

View File

@ -33,6 +33,7 @@
#include "RimWellLogPlotCollection.h"
#include "RimWellLogTrack.h"
#include "RimWellLogWbsCurve.h"
#include "RimWellMeasurementCurve.h"
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
@ -438,6 +439,7 @@ void RimWellLogCurveCommonDataSource::updateCurvesAndTracks( const std::vector<R
}
RimWellLogFileCurve* fileCurve = dynamic_cast<RimWellLogFileCurve*>( curve );
RimWellLogExtractionCurve* extractionCurve = dynamic_cast<RimWellLogExtractionCurve*>( curve );
RimWellMeasurementCurve* measurementCurve = dynamic_cast<RimWellMeasurementCurve*>( curve );
if ( fileCurve )
{
if ( wellPathToApply() != nullptr )
@ -525,6 +527,13 @@ void RimWellLogCurveCommonDataSource::updateCurvesAndTracks( const std::vector<R
curve->updateConnectedEditors();
}
}
else if ( measurementCurve )
{
if ( wellPathToApply() != nullptr )
{
measurementCurve->setWellPath( wellPathToApply() );
}
}
}
for ( RimWellLogTrack* track : tracks )

View File

@ -251,21 +251,7 @@ QList<caf::PdmOptionItemInfo>
if ( fieldNeedingOptions == &m_wellPath )
{
auto wellPathColl = RimTools::wellPathCollection();
if ( wellPathColl )
{
caf::PdmChildArrayField<RimWellPath*>& wellPaths = wellPathColl->wellPaths;
for ( size_t i = 0; i < wellPaths.size(); i++ )
{
options.push_back( caf::PdmOptionItemInfo( wellPaths[i]->name(), wellPaths[i] ) );
}
if ( options.size() > 0 )
{
options.push_front( caf::PdmOptionItemInfo( "None", nullptr ) );
}
}
RimTools::wellPathOptionItems( &options );
}
return options;