From 787d3ae379a0dcf9e989a3d7d4dff9f1e11f900b Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sat, 28 May 2022 09:53:22 +0200 Subject: [PATCH] #8868 Well Log Plot: Appearance update not working --- .../ProjectDataModel/WellLog/RimWellLogTrack.cpp | 12 ++++++++++++ .../ProjectDataModel/WellLog/RimWellLogTrack.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogTrack.cpp b/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogTrack.cpp index 897e12f0d2..38645637ee 100644 --- a/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogTrack.cpp +++ b/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogTrack.cpp @@ -1233,6 +1233,18 @@ bool RimWellLogTrack::isEmptyVisibleXRange() const 1.0e-6 * std::max( 1.0, std::max( m_visiblePropertyValueRangeMax(), m_visiblePropertyValueRangeMin() ) ); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogTrack::onChildrenUpdated( caf::PdmChildArrayFieldHandle* childArray, + std::vector& updatedObjects ) +{ + if ( childArray == &m_curves ) + { + loadDataAndUpdate(); + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogTrack.h b/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogTrack.h index 56ef8fdd38..26c597e49b 100644 --- a/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogTrack.h +++ b/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogTrack.h @@ -241,6 +241,8 @@ protected: // RimViewWindow overrides void deleteViewWidget() override; void onLoadDataAndUpdate() override; + void onChildrenUpdated( caf::PdmChildArrayFieldHandle* childArray, + std::vector& updatedObjects ) override; private: RiuPlotWidget* doCreatePlotViewWidget( QWidget* mainWindowParent = nullptr ) override; @@ -371,4 +373,5 @@ private: double m_availablePropertyValueRangeMax; double m_availableDepthRangeMin; double m_availableDepthRangeMax; + };