From 7455415f88577651592a6654018e974b2802531d Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 5 Sep 2017 11:49:05 +0200 Subject: [PATCH] #1859 SummaryPlot: Missing redraw of qwtPlot when deleting curves --- .../ProjectDataModel/RimPlotCurve.cpp | 16 +++++++++++----- .../ProjectDataModel/RimWellLogCurve.cpp | 8 -------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimPlotCurve.cpp b/ApplicationCode/ProjectDataModel/RimPlotCurve.cpp index b3e8390827..4e0dde87f5 100644 --- a/ApplicationCode/ProjectDataModel/RimPlotCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimPlotCurve.cpp @@ -113,11 +113,17 @@ RimPlotCurve::RimPlotCurve() //-------------------------------------------------------------------------------------------------- RimPlotCurve::~RimPlotCurve() { - if (m_qwtPlotCurve) - { - m_qwtPlotCurve->detach(); - delete m_qwtPlotCurve; - } + if (m_qwtPlotCurve) + { + m_qwtPlotCurve->detach(); + delete m_qwtPlotCurve; + m_qwtPlotCurve = NULL; + } + + if (m_parentQwtPlot) + { + m_parentQwtPlot->replot(); + } } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimWellLogCurve.cpp b/ApplicationCode/ProjectDataModel/RimWellLogCurve.cpp index c0d2e21a53..2edbead991 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogCurve.cpp @@ -54,14 +54,6 @@ RimWellLogCurve::RimWellLogCurve() //-------------------------------------------------------------------------------------------------- RimWellLogCurve::~RimWellLogCurve() { - m_qwtPlotCurve->detach(); - delete m_qwtPlotCurve; - m_qwtPlotCurve = NULL; - - if (m_parentQwtPlot) - { - m_parentQwtPlot->replot(); - } }