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

View File

@ -251,21 +251,7 @@ QList<caf::PdmOptionItemInfo>
if ( fieldNeedingOptions == &m_wellPath ) if ( fieldNeedingOptions == &m_wellPath )
{ {
auto wellPathColl = RimTools::wellPathCollection(); RimTools::wellPathOptionItems( &options );
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 ) );
}
}
} }
return options; return options;