mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2920 Save window state for main window when closing plot window last (and vice versa).
This commit is contained in:
@@ -1536,6 +1536,23 @@ void RiaApplication::waitUntilCommandObjectsHasBeenProcessed()
|
||||
m_commandQueueLock.unlock();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaApplication::saveWinGeoAndDockToolBarLayout()
|
||||
{
|
||||
if (m_mainPlotWindow)
|
||||
{
|
||||
m_mainPlotWindow->saveWinGeoAndDockToolBarLayout();
|
||||
}
|
||||
|
||||
if (RiuMainWindow::instance())
|
||||
{
|
||||
RiuMainWindow::instance()->saveWinGeoAndDockToolBarLayout();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -200,7 +200,7 @@ public:
|
||||
static std::vector<QString> readFileListFromTextFile(QString listFileName);
|
||||
|
||||
void waitUntilCommandObjectsHasBeenProcessed();
|
||||
|
||||
void saveWinGeoAndDockToolBarLayout();
|
||||
|
||||
private:
|
||||
void onProjectOpenedOrClosed();
|
||||
|
||||
@@ -250,7 +250,7 @@ void RiuMainWindow::closeEvent(QCloseEvent* event)
|
||||
return;
|
||||
}
|
||||
|
||||
saveWinGeoAndDockToolBarLayout();
|
||||
app->saveWinGeoAndDockToolBarLayout();
|
||||
|
||||
if (!app->tryClosePlotWindow()) return;
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ void RiuPlotMainWindow::closeEvent(QCloseEvent* event)
|
||||
return;
|
||||
}
|
||||
|
||||
saveWinGeoAndDockToolBarLayout();
|
||||
app->saveWinGeoAndDockToolBarLayout();
|
||||
|
||||
if (!app->tryCloseMainWindow())
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user