diff --git a/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.cpp b/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.cpp index 8ad18b95bb..e20775dfc7 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.cpp @@ -25,6 +25,7 @@ #include "RimPerforationCollection.h" #include "RimProject.h" +#include "RimWellLogTrack.h" #include "RimWellPath.h" #include "RimWellPathValve.h" @@ -233,6 +234,21 @@ std::vector RimPerforationInterval::valves() const return allValves; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimPerforationInterval::updateAllReferringTracks() +{ + std::vector wellLogTracks; + + this->objectsWithReferringPtrFieldsOfType(wellLogTracks); + for (RimWellLogTrack* track : wellLogTracks) + { + track->loadDataAndUpdate(); + } + this->updateConnectedEditors(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -298,6 +314,8 @@ void RimPerforationInterval::fieldChangedByUi(const caf::PdmFieldHandle* changed const QVariant& oldValue, const QVariant& newValue) { + this->updateAllReferringTracks(); + RimProject* proj = nullptr; this->firstAncestorOrThisOfTypeAsserted(proj); proj->reloadCompletionTypeResultsInAllViews(); diff --git a/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.h b/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.h index 3dfffc3459..49e5ab8dd6 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.h +++ b/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.h @@ -68,6 +68,7 @@ public: void addValve(RimWellPathValve* valve); std::vector valves() const; + void updateAllReferringTracks(); // RimWellPathCompletionInterface overrides bool isEnabled() const override; diff --git a/ApplicationCode/ProjectDataModel/Completions/RimWellPathValve.cpp b/ApplicationCode/ProjectDataModel/Completions/RimWellPathValve.cpp index 24cae46c7a..35b37a9239 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimWellPathValve.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimWellPathValve.cpp @@ -311,6 +311,10 @@ QList RimWellPathValve::calculateValueOptions(const caf: //-------------------------------------------------------------------------------------------------- void RimWellPathValve::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { + RimPerforationInterval* perfInterval; + this->firstAncestorOrThisOfTypeAsserted(perfInterval); + perfInterval->updateAllReferringTracks(); + RimProject* proj; this->firstAncestorOrThisOfTypeAsserted(proj); proj->reloadCompletionTypeResultsInAllViews();