From 5e18afd44ce6dbd2c76cebb856cc1a7a8e8a9a49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A5l=20Hagen?= Date: Mon, 31 Aug 2015 11:05:55 +0200 Subject: [PATCH] (#396) Implemented deletion of well log plots --- ApplicationCode/ProjectDataModel/RimProject.cpp | 1 + ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ApplicationCode/ProjectDataModel/RimProject.cpp b/ApplicationCode/ProjectDataModel/RimProject.cpp index 2518a65fb9..c5028f9203 100644 --- a/ApplicationCode/ProjectDataModel/RimProject.cpp +++ b/ApplicationCode/ProjectDataModel/RimProject.cpp @@ -757,6 +757,7 @@ void RimProject::actionsBasedOnSelection(QMenu& contextMenu) else if (dynamic_cast(uiItem)) { commandIds << "RicNewWellLogPlotTraceFeature"; + commandIds << "RicDeleteItemFeature"; } else if (dynamic_cast(uiItem)) { diff --git a/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp b/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp index 99c25eb8d5..357f0d0b14 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp @@ -54,6 +54,8 @@ RimWellLogPlot::RimWellLogPlot() //-------------------------------------------------------------------------------------------------- RimWellLogPlot::~RimWellLogPlot() { + RiuMainWindow::instance()->removeWellLogViewer(m_viewer); + delete m_viewer; } //--------------------------------------------------------------------------------------------------