mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1430 When closing top level windows, do not close project if other is visible
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user