mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
#1401 Ask user to save modified project before project close
This commit is contained in:
@@ -137,11 +137,18 @@ void RiuMainPlotWindow::cleanupGuiBeforeProjectClose()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuMainPlotWindow::closeEvent(QCloseEvent* event)
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
if (!app->askUserToSaveModifiedProject())
|
||||
{
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
|
||||
saveWinGeoAndDockToolBarLayout();
|
||||
|
||||
if (!RiaApplication::instance()->tryCloseMainWindow()) return;
|
||||
if (!app->tryCloseMainWindow()) return;
|
||||
|
||||
RiaApplication::instance()->closeProject();
|
||||
app->closeProject();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user