mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7236 Rewrite window closing in ResInsight
This commit is contained in:
@@ -189,6 +189,8 @@ RiaGuiApplication::RiaGuiApplication( int& argc, char** argv )
|
||||
setWindowIcon( QIcon( ":/AppLogo48x48.png" ) );
|
||||
|
||||
m_recentFileActionProvider = std::make_unique<RiuRecentFileActionProvider>();
|
||||
|
||||
connect( this, SIGNAL( lastWindowClosed() ), SLOT( onLastWindowClosed() ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -972,7 +974,6 @@ void RiaGuiApplication::createMainPlotWindow()
|
||||
CVF_ASSERT( m_mainPlotWindow == nullptr );
|
||||
|
||||
m_mainPlotWindow = new RiuPlotMainWindow;
|
||||
|
||||
m_mainPlotWindow->setWindowTitle( "Plots - ResInsight" );
|
||||
m_mainPlotWindow->setDefaultWindowSize();
|
||||
m_mainPlotWindow->loadWinGeoAndDockToolBarLayout();
|
||||
@@ -1106,28 +1107,6 @@ bool RiaGuiApplication::isMainPlotWindowVisible() const
|
||||
return m_mainPlotWindow && m_mainPlotWindow->isVisible();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaGuiApplication::closeMainWindowIfOpenButHidden()
|
||||
{
|
||||
if ( m_mainWindow && !m_mainWindow->isVisible() )
|
||||
{
|
||||
m_mainWindow->close();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaGuiApplication::closeMainPlotWindowIfOpenButHidden()
|
||||
{
|
||||
if ( m_mainPlotWindow && !m_mainPlotWindow->isVisible() )
|
||||
{
|
||||
m_mainPlotWindow->close();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1635,6 +1614,15 @@ void RiaGuiApplication::slotWorkerProcessFinished( int exitCode, QProcess::ExitS
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaGuiApplication::onLastWindowClosed()
|
||||
{
|
||||
closeProject();
|
||||
quit();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user