#1430 When closing top level windows, do not close project if other is visible

This commit is contained in:
Magne Sjaastad
2017-04-25 15:01:31 +02:00
parent 64d41fa109
commit 63b07b1152
4 changed files with 33 additions and 0 deletions

View File

@@ -138,6 +138,12 @@ void RiuMainPlotWindow::cleanupGuiBeforeProjectClose()
void RiuMainPlotWindow::closeEvent(QCloseEvent* event)
{
RiaApplication* app = RiaApplication::instance();
if (app->isMain3dWindowVisible())
{
return;
}
if (!app->askUserToSaveModifiedProject())
{
event->ignore();

View File

@@ -198,6 +198,12 @@ void RiuMainWindow::cleanupGuiBeforeProjectClose()
void RiuMainWindow::closeEvent(QCloseEvent* event)
{
RiaApplication* app = RiaApplication::instance();
if (app->isMainPlotWindowVisible())
{
return;
}
if (!app->askUserToSaveModifiedProject())
{
event->ignore();