diff --git a/ApplicationCode/ProjectDataModel/RimWellMeasurement.cpp b/ApplicationCode/ProjectDataModel/RimWellMeasurement.cpp index 258194bc09..7f5875a904 100644 --- a/ApplicationCode/ProjectDataModel/RimWellMeasurement.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellMeasurement.cpp @@ -187,7 +187,7 @@ void RimWellMeasurement::fieldChangedByUi( const caf::PdmFieldHandle* changedFie RimWellMeasurementCollection* wellMeasurementCollection; this->firstAncestorOrThisOfTypeAsserted( wellMeasurementCollection ); - wellMeasurementCollection->updateAllReferringTracks(); + wellMeasurementCollection->updateAllReferringTracksAndCurves(); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimWellMeasurementCollection.cpp b/ApplicationCode/ProjectDataModel/RimWellMeasurementCollection.cpp index ff21d8a5aa..3dcb48c2ba 100644 --- a/ApplicationCode/ProjectDataModel/RimWellMeasurementCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellMeasurementCollection.cpp @@ -17,9 +17,11 @@ ///////////////////////////////////////////////////////////////////////////////// #include "RimWellMeasurementCollection.h" +#include "RimMainPlotCollection.h" #include "RimProject.h" #include "RimWellLogTrack.h" #include "RimWellMeasurement.h" +#include "RimWellMeasurementCurve.h" #include "RimWellMeasurementFilePath.h" #include "cafPdmUiTableViewEditor.h" @@ -52,7 +54,7 @@ RimWellMeasurementCollection::~RimWellMeasurementCollection() {} //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimWellMeasurementCollection::updateAllReferringTracks() +void RimWellMeasurementCollection::updateAllReferringTracksAndCurves() { std::vector wellLogTracks; @@ -62,6 +64,17 @@ void RimWellMeasurementCollection::updateAllReferringTracks() track->loadDataAndUpdate(); } this->updateConnectedEditors(); + + RimProject* proj; + this->firstAncestorOrThisOfTypeAsserted( proj ); + RimMainPlotCollection* plotCollection = proj->mainPlotCollection(); + + std::vector measurementCurves; + plotCollection->descendantsIncludingThisOfType( measurementCurves ); + for ( auto curve : measurementCurves ) + { + curve->loadDataAndUpdate( true ); + } } //-------------------------------------------------------------------------------------------------- @@ -98,7 +111,7 @@ void RimWellMeasurementCollection::insertMeasurement( RimWellMeasurement* insert m_measurements.push_back( measurement ); addFilePath( measurement->filePath() ); - this->updateAllReferringTracks(); + this->updateAllReferringTracksAndCurves(); } //-------------------------------------------------------------------------------------------------- @@ -108,7 +121,7 @@ void RimWellMeasurementCollection::appendMeasurement( RimWellMeasurement* measur { m_measurements.push_back( measurement ); addFilePath( measurement->filePath() ); - this->updateAllReferringTracks(); + this->updateAllReferringTracksAndCurves(); } //-------------------------------------------------------------------------------------------------- @@ -119,7 +132,7 @@ void RimWellMeasurementCollection::deleteMeasurement( RimWellMeasurement* measur m_measurements.removeChildObject( measurementToDelete ); delete measurementToDelete; - this->updateAllReferringTracks(); + this->updateAllReferringTracksAndCurves(); } //-------------------------------------------------------------------------------------------------- @@ -128,7 +141,7 @@ void RimWellMeasurementCollection::deleteMeasurement( RimWellMeasurement* measur void RimWellMeasurementCollection::deleteAllMeasurements() { m_measurements.deleteAllChildObjects(); - this->updateAllReferringTracks(); + this->updateAllReferringTracksAndCurves(); } //-------------------------------------------------------------------------------------------------- @@ -234,5 +247,5 @@ void RimWellMeasurementCollection::removeMeasurementsForFilePath( RimWellMeasure RimProject* proj; this->firstAncestorOrThisOfTypeAsserted( proj ); proj->scheduleCreateDisplayModelAndRedrawAllViews(); - this->updateAllReferringTracks(); + this->updateAllReferringTracksAndCurves(); } diff --git a/ApplicationCode/ProjectDataModel/RimWellMeasurementCollection.h b/ApplicationCode/ProjectDataModel/RimWellMeasurementCollection.h index 5f5eaf58a5..390f35805a 100644 --- a/ApplicationCode/ProjectDataModel/RimWellMeasurementCollection.h +++ b/ApplicationCode/ProjectDataModel/RimWellMeasurementCollection.h @@ -38,7 +38,7 @@ public: std::vector measurements() const; - void updateAllReferringTracks(); + void updateAllReferringTracksAndCurves(); void insertMeasurement( RimWellMeasurement* insertBefore, RimWellMeasurement* measurement ); void appendMeasurement( RimWellMeasurement* measurement ); void deleteMeasurement( RimWellMeasurement* measurementToDelete );