[Gui] Send 'mainWindowClosed' signal before window settings are saved

So macros/add-ons can eventually restore things
This commit is contained in:
0penBrain
2021-07-20 20:55:04 +02:00
parent c71c022b15
commit 1dab35b01d

View File

@@ -1162,6 +1162,7 @@ void MainWindow::closeEvent (QCloseEvent * e)
if (Workbench* wb = WorkbenchManager::instance()->active())
wb->removeTaskWatcher();
/*emit*/ mainWindowClosed();
d->activityTimer->stop();
saveWindowSettings();
delete d->assistant;
@@ -1175,7 +1176,6 @@ void MainWindow::closeEvent (QCloseEvent * e)
fi.deleteFile();
}
/*emit*/ mainWindowClosed();
if (this->property("QuitOnClosed").isValid()) {
QApplication::closeAllWindows();
qApp->quit(); // stop the event loop