Skip to content

Commit

Permalink
Close all top level windows before closing the MainWindow (#9102)
Browse files Browse the repository at this point in the history
Fixes #9101
  • Loading branch information
adeas31 committed Jun 16, 2022
1 parent 63f5944 commit b6fbd45
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions OMEdit/OMEditLIB/MainWindow.cpp
Expand Up @@ -579,6 +579,13 @@ int MainWindow::askForExit()
*/
void MainWindow::beforeClosingMainWindow()
{
// Issue #9101. Close all top level windows
foreach (QWidget *pWidget, QApplication::topLevelWidgets()) {
if (pWidget == this) {
continue;
}
pWidget->close();
}
mpOMCProxy->quitOMC();
delete mpOMCProxy;
// delete the OMSProxy object
Expand Down

0 comments on commit b6fbd45

Please sign in to comment.