mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #5190 from OPM/fix-timers
Avoid timers being used from statically allocated dialog
This commit is contained in:
@@ -1099,7 +1099,8 @@ void RiaGuiApplication::deleteMainPlotWindow()
|
|||||||
{
|
{
|
||||||
if ( m_mainPlotWindow )
|
if ( m_mainPlotWindow )
|
||||||
{
|
{
|
||||||
m_mainPlotWindow->deleteLater();
|
m_mainPlotWindow->setParent( nullptr );
|
||||||
|
delete m_mainPlotWindow;
|
||||||
m_mainPlotWindow = nullptr;
|
m_mainPlotWindow = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,8 @@
|
|||||||
|
|
||||||
#include "RimSummaryPlot.h"
|
#include "RimSummaryPlot.h"
|
||||||
|
|
||||||
|
#include "RiuPlotMainWindow.h"
|
||||||
|
|
||||||
#include "cafPdmUiPropertyViewDialog.h"
|
#include "cafPdmUiPropertyViewDialog.h"
|
||||||
#include "cafSelectionManager.h"
|
#include "cafSelectionManager.h"
|
||||||
#include "cvfAssert.h"
|
#include "cvfAssert.h"
|
||||||
@@ -62,14 +64,14 @@ void RicEditSummaryPlotFeature::closeDialogAndResetTargetPlot()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RicSummaryCurveCreatorDialog* RicEditSummaryPlotFeature::curveCreatorDialog()
|
RicSummaryCurveCreatorDialog* RicEditSummaryPlotFeature::curveCreatorDialog()
|
||||||
{
|
{
|
||||||
static std::unique_ptr<RicSummaryCurveCreatorDialog> singletonDialog;
|
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||||
|
|
||||||
if ( !singletonDialog )
|
if ( mainPlotWindow )
|
||||||
{
|
{
|
||||||
singletonDialog.reset( new RicSummaryCurveCreatorDialog( nullptr ) );
|
return mainPlotWindow->summaryCurveCreatorDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
return singletonDialog.get();
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -37,6 +37,8 @@
|
|||||||
#include "RimWellLogPlot.h"
|
#include "RimWellLogPlot.h"
|
||||||
#include "RimWellRftPlot.h"
|
#include "RimWellRftPlot.h"
|
||||||
|
|
||||||
|
#include "SummaryPlotCommands/RicSummaryCurveCreatorDialog.h"
|
||||||
|
|
||||||
#include "RiuDockWidgetTools.h"
|
#include "RiuDockWidgetTools.h"
|
||||||
#include "RiuDragDrop.h"
|
#include "RiuDragDrop.h"
|
||||||
#include "RiuGridPlotWindow.h"
|
#include "RiuGridPlotWindow.h"
|
||||||
@@ -639,6 +641,19 @@ void RiuPlotMainWindow::setFocusToLineEditInSummaryToolBar()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RicSummaryCurveCreatorDialog* RiuPlotMainWindow::summaryCurveCreatorDialog()
|
||||||
|
{
|
||||||
|
if ( m_summaryCurveCreatorDialog.isNull() )
|
||||||
|
{
|
||||||
|
m_summaryCurveCreatorDialog = new RicSummaryCurveCreatorDialog( this );
|
||||||
|
}
|
||||||
|
|
||||||
|
return m_summaryCurveCreatorDialog;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -24,6 +24,8 @@
|
|||||||
#include "cafPdmPointer.h"
|
#include "cafPdmPointer.h"
|
||||||
#include "cafPdmUiDragDropInterface.h"
|
#include "cafPdmUiDragDropInterface.h"
|
||||||
|
|
||||||
|
#include <QPointer>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
class QMdiSubWindow;
|
class QMdiSubWindow;
|
||||||
@@ -32,6 +34,7 @@ class RiuViewer;
|
|||||||
|
|
||||||
struct RimMdiWindowGeometry;
|
struct RimMdiWindowGeometry;
|
||||||
class RimViewWindow;
|
class RimViewWindow;
|
||||||
|
class RicSummaryCurveCreatorDialog;
|
||||||
|
|
||||||
namespace caf
|
namespace caf
|
||||||
{
|
{
|
||||||
@@ -84,6 +87,8 @@ public:
|
|||||||
void updateSummaryPlotToolBar( bool forceUpdateUi = false );
|
void updateSummaryPlotToolBar( bool forceUpdateUi = false );
|
||||||
void setFocusToLineEditInSummaryToolBar();
|
void setFocusToLineEditInSummaryToolBar();
|
||||||
|
|
||||||
|
RicSummaryCurveCreatorDialog* summaryCurveCreatorDialog();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void closeEvent( QCloseEvent* event ) override;
|
void closeEvent( QCloseEvent* event ) override;
|
||||||
void keyPressEvent( QKeyEvent* ) override;
|
void keyPressEvent( QKeyEvent* ) override;
|
||||||
@@ -127,5 +132,7 @@ private:
|
|||||||
|
|
||||||
caf::PdmUiPropertyView* m_pdmUiPropertyView;
|
caf::PdmUiPropertyView* m_pdmUiPropertyView;
|
||||||
|
|
||||||
|
QPointer<RicSummaryCurveCreatorDialog> m_summaryCurveCreatorDialog;
|
||||||
|
|
||||||
std::vector<QWidget*> m_temporaryWidgets;
|
std::vector<QWidget*> m_temporaryWidgets;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user