mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1401 Ask user to save modified project before project close
This commit is contained in:
@@ -197,15 +197,18 @@ void RiuMainWindow::cleanupGuiBeforeProjectClose()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuMainWindow::closeEvent(QCloseEvent* event)
|
||||
{
|
||||
saveWinGeoAndDockToolBarLayout();
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
if (!app->askUserToSaveModifiedProject())
|
||||
{
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
|
||||
saveWinGeoAndDockToolBarLayout();
|
||||
|
||||
if (!app->tryClosePlotWindow()) return;
|
||||
|
||||
RiaApplication::instance()->closeProject();
|
||||
|
||||
event->accept();
|
||||
app->closeProject();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user