mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 07:03:25 -06:00
#1938 Curve creator: Close all widgets on closing of curve creator
This commit is contained in:
parent
4019e76ae1
commit
31133f31c0
@ -18,9 +18,13 @@
|
||||
|
||||
#include "RicSummaryCurveCreatorDialog.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RicSummaryCurveCreator.h"
|
||||
#include "RicSummaryCurveCreatorSplitterUi.h"
|
||||
|
||||
#include "RiuMainPlotWindow.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -43,6 +47,8 @@ RicSummaryCurveCreatorDialog::RicSummaryCurveCreatorDialog(QWidget* parent, RicS
|
||||
setWindowTitle("ResInsight: Plot Editor");
|
||||
resize(1200, 800);
|
||||
connect(m_curveCreatorSplitterUi, SIGNAL(signalCloseButtonPressed()), this, SLOT(accept()));
|
||||
|
||||
connect(this, SIGNAL(finished(int)), this, SLOT(slotDialogFinished()));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -50,5 +56,16 @@ RicSummaryCurveCreatorDialog::RicSummaryCurveCreatorDialog(QWidget* parent, RicS
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicSummaryCurveCreatorDialog::~RicSummaryCurveCreatorDialog()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicSummaryCurveCreatorDialog::slotDialogFinished()
|
||||
{
|
||||
RiuMainPlotWindow* plotwindow = RiaApplication::instance()->mainPlotWindow();
|
||||
if (plotwindow)
|
||||
{
|
||||
plotwindow->cleanUpTemporaryWidgets();
|
||||
}
|
||||
}
|
||||
|
@ -29,10 +29,14 @@ class RicSummaryCurveCreator;
|
||||
//==================================================================================================
|
||||
class RicSummaryCurveCreatorDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RicSummaryCurveCreatorDialog(QWidget* parent, RicSummaryCurveCreator* summaryCurveCreator);
|
||||
~RicSummaryCurveCreatorDialog();
|
||||
|
||||
private slots:
|
||||
void slotDialogFinished();
|
||||
|
||||
private:
|
||||
RicSummaryCurveCreatorSplitterUi* m_curveCreatorSplitterUi;
|
||||
};
|
||||
|
@ -119,6 +119,16 @@ void RiuMainPlotWindow::cleanupGuiBeforeProjectClose()
|
||||
m_pdmUiPropertyView->showProperties(NULL);
|
||||
}
|
||||
|
||||
cleanUpTemporaryWidgets();
|
||||
|
||||
setWindowTitle("Plots - ResInsight");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuMainPlotWindow::cleanUpTemporaryWidgets()
|
||||
{
|
||||
for (QWidget* w : m_temporaryWidgets)
|
||||
{
|
||||
w->close();
|
||||
@ -126,8 +136,6 @@ void RiuMainPlotWindow::cleanupGuiBeforeProjectClose()
|
||||
}
|
||||
|
||||
m_temporaryWidgets.clear();
|
||||
|
||||
setWindowTitle("Plots - ResInsight");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -57,6 +57,7 @@ public:
|
||||
|
||||
void initializeGuiNewProjectLoaded();
|
||||
void cleanupGuiBeforeProjectClose();
|
||||
void cleanUpTemporaryWidgets();
|
||||
|
||||
void removeViewer( QWidget* viewer ) override;
|
||||
void addViewer(QWidget* viewer, const RimMdiWindowGeometry& windowsGeometry) override;
|
||||
|
Loading…
Reference in New Issue
Block a user