From 1000c96c3e75f779bfe449055e280969ecf06a70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A5l=20Hagen?= Date: Tue, 8 Sep 2015 10:21:33 +0200 Subject: [PATCH] (#431) Turning toggle field off when removing well log plot viewer widget --- ApplicationCode/ProjectDataModel/RimWellLogPlot.h | 3 ++- ApplicationCode/UserInterface/RiuWellLogPlot.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ApplicationCode/ProjectDataModel/RimWellLogPlot.h b/ApplicationCode/ProjectDataModel/RimWellLogPlot.h index 4a5e40d90d..c3717caeab 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogPlot.h +++ b/ApplicationCode/ProjectDataModel/RimWellLogPlot.h @@ -62,6 +62,8 @@ public: void updateAxisRanges(); void setVisibleDepthRangeFromContents(); + caf::PdmField showWindow; + protected: // Overridden PDM methods @@ -80,7 +82,6 @@ private: private: QPointer m_viewer; - caf::PdmField showWindow; caf::PdmField< std::vector > windowGeometry; caf::PdmChildArrayField traces; diff --git a/ApplicationCode/UserInterface/RiuWellLogPlot.cpp b/ApplicationCode/UserInterface/RiuWellLogPlot.cpp index 1ff09bd816..169a206a3d 100644 --- a/ApplicationCode/UserInterface/RiuWellLogPlot.cpp +++ b/ApplicationCode/UserInterface/RiuWellLogPlot.cpp @@ -57,6 +57,12 @@ RiuWellLogPlot::RiuWellLogPlot(RimWellLogPlot* plotDefinition, QWidget* parent) //-------------------------------------------------------------------------------------------------- RiuWellLogPlot::~RiuWellLogPlot() { + if (m_plotDefinition) + { + m_plotDefinition->showWindow = false; + m_plotDefinition->uiCapability()->updateUiIconFromToggleField(); + m_plotDefinition->updateConnectedEditors(); + } } //--------------------------------------------------------------------------------------------------