From eaff6f88c4b0087d8b326651243161a0a359a24f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A5l=20Hagen?= Date: Mon, 31 Aug 2015 10:12:45 +0200 Subject: [PATCH] (#396) Using toggle field of well log plots to toggle visibility --- .../ProjectDataModel/RimWellLogPlot.cpp | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp b/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp index be6567b31c..99c25eb8d5 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp @@ -71,6 +71,15 @@ void RimWellLogPlot::updateViewerWidget() RiuMainWindow::instance()->addWellLogViewer(m_viewer); isViewerCreated = true; } + + if (m_viewer->parentWidget()) + { + m_viewer->parentWidget()->showMaximized(); + } + else + { + m_viewer->showMaximized(); + } RiuMainWindow::instance()->setActiveWellLogViewer(m_viewer); } @@ -87,6 +96,20 @@ void RimWellLogPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c { updateViewerWidget(); } + else + { + if (m_viewer) + { + if (m_viewer->parentWidget()) + { + m_viewer->parentWidget()->hide(); + } + else + { + m_viewer->hide(); + } + } + } } }