1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-10-05 23:56:33 +00:00

Consolidates and disables failed attempt at final-window close behaviour.

This commit is contained in:
Thomas Harte 2020-06-21 23:52:41 -04:00
parent b17cceaeaf
commit 13336b8ad5

View File

@ -62,20 +62,17 @@ MainWindow::~MainWindow() {
// Store the current user selections. // Store the current user selections.
storeSelections(); storeSelections();
// SDI behaviour, which may or may not be normal (?): if the user is closing a
// final window, and it contains a machine, send them back to the machine picker.
// i.e. assume they were closing that document, not the application.
--mainWindowCount; --mainWindowCount;
if(machine && !mainWindowCount) {
MainWindow *const other = new MainWindow;
other->show();
}
} }
void MainWindow::closeEvent(QCloseEvent *event) { void MainWindow::closeEvent(QCloseEvent *event) {
if(mainWindowCount == 1 && machine) { // SDI behaviour, which may or may not be normal (?): if the user is closing a
qDebug() << "close, yah"; // final window, and it contains a machine, send them back to the machine picker.
} // i.e. assume they were closing that document, not the application.
// if(mainWindowCount == 1 && machine) {
// MainWindow *const other = new MainWindow;
// other->show();
// }
QMainWindow::closeEvent(event); QMainWindow::closeEvent(event);
} }