#4171 Work around assert failure when closing main window last

This commit is contained in:
Gaute Lindkvist 2019-03-06 15:39:22 +01:00
parent fd01871202
commit e9e21cf30d
2 changed files with 4 additions and 0 deletions

View File

@ -264,6 +264,8 @@ void RiuMainWindow::closeEvent(QCloseEvent* event)
if (app->isMainPlotWindowVisible())
{
event->ignore(); // Make Qt think we don't do anything, otherwise it closes the window.
this->hide(); // Instead we just hide it.
return;
}

View File

@ -169,6 +169,8 @@ void RiuPlotMainWindow::closeEvent(QCloseEvent* event)
if (app->isMain3dWindowVisible())
{
event->ignore();
this->hide();
return;
}