From 1ba2fc14a59ae06d8f00d5c2c3d5840d0edf1ee6 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Wed, 4 Dec 2019 11:48:51 +0100 Subject: [PATCH 1/3] #5177 Saturation Plots : Plots are not deleted on project close --- ApplicationCode/ProjectDataModel/RimMainPlotCollection.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ApplicationCode/ProjectDataModel/RimMainPlotCollection.cpp b/ApplicationCode/ProjectDataModel/RimMainPlotCollection.cpp index dbf8ff3332..377a27bde3 100644 --- a/ApplicationCode/ProjectDataModel/RimMainPlotCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimMainPlotCollection.cpp @@ -193,6 +193,7 @@ void RimMainPlotCollection::deleteAllContainedObjects() m_summaryCrossPlotCollection()->deleteAllChildObjects(); m_gridCrossPlotCollection->deleteAllChildObjects(); m_flowPlotCollection()->closeDefaultPlotWindowAndDeletePlots(); + m_saturationPressurePlotCollection()->deleteAllChildObjects(); } //-------------------------------------------------------------------------------------------------- From df55c5f6dcd18521f458414c3c31a71f0601a4eb Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Wed, 4 Dec 2019 12:37:55 +0100 Subject: [PATCH 2/3] Janitor : Avoid replot in destructor of RimPlotCurve --- ApplicationCode/ProjectDataModel/RimPlotCurve.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimPlotCurve.cpp b/ApplicationCode/ProjectDataModel/RimPlotCurve.cpp index f4480dc491..48bdb98d50 100644 --- a/ApplicationCode/ProjectDataModel/RimPlotCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimPlotCurve.cpp @@ -181,11 +181,6 @@ RimPlotCurve::~RimPlotCurve() delete m_qwtCurveErrorBars; m_qwtCurveErrorBars = nullptr; } - - if ( m_parentQwtPlot ) - { - m_parentQwtPlot->replot(); - } } //-------------------------------------------------------------------------------------------------- From 87fecb876fc121a521072cc53afcf082b9ebad05 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Wed, 4 Dec 2019 13:04:44 +0100 Subject: [PATCH 3/3] Janitor : Avoid use of smart pointer on a QObject --- .../SummaryPlotCommands/RicSummaryCurveCreatorDialog.cpp | 4 ++-- .../SummaryPlotCommands/RicSummaryCurveCreatorDialog.h | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorDialog.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorDialog.cpp index f7d8ca667a..a451787c10 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorDialog.cpp +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorDialog.cpp @@ -36,7 +36,7 @@ RicSummaryCurveCreatorDialog::RicSummaryCurveCreatorDialog( QWidget* parent ) : QDialog( parent, RiuTools::defaultDialogFlags() ) { - m_curveCreatorSplitterUi.reset( new RicSummaryCurveCreatorSplitterUi( this ) ); + m_curveCreatorSplitterUi = new RicSummaryCurveCreatorSplitterUi( this ); QWidget* propertyWidget = m_curveCreatorSplitterUi->getOrCreateWidget( this ); @@ -46,7 +46,7 @@ RicSummaryCurveCreatorDialog::RicSummaryCurveCreatorDialog( QWidget* parent ) setWindowTitle( "Plot Editor" ); resize( 1200, 800 ); - connect( m_curveCreatorSplitterUi.get(), SIGNAL( signalCloseButtonPressed() ), this, SLOT( accept() ) ); + connect( m_curveCreatorSplitterUi, SIGNAL( signalCloseButtonPressed() ), this, SLOT( accept() ) ); connect( this, SIGNAL( finished( int ) ), this, SLOT( slotDialogFinished() ) ); } diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorDialog.h b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorDialog.h index 7573d1d015..1c154052f4 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorDialog.h +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorDialog.h @@ -20,8 +20,6 @@ #include -#include - namespace caf { class PdmObject; @@ -49,5 +47,5 @@ private slots: void slotDialogFinished(); private: - std::unique_ptr m_curveCreatorSplitterUi; + RicSummaryCurveCreatorSplitterUi* m_curveCreatorSplitterUi; };