fix(cpn): Ignore 'Quit' event in main window on MacOS if simulator running (#2874)
Prevents app crashing on exit while the simulator is open.
This commit is contained in:
@@ -197,6 +197,14 @@ void MainWindow::displayWarnings()
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
// If simulator is running ignore this Quit event (simulator will still be closed)
|
||||
// - prevents app crash on exit
|
||||
if (isSimulatorRunning()) {
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
g.mainWinGeo(saveGeometry());
|
||||
g.mainWinState(saveState());
|
||||
g.tabbedMdi(actTabbedWindows->isChecked());
|
||||
|
||||
Reference in New Issue
Block a user