mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-23 03:32:32 +00:00
Consolidates and disables failed attempt at final-window close behaviour.
This commit is contained in:
parent
b17cceaeaf
commit
13336b8ad5
@ -62,20 +62,17 @@ MainWindow::~MainWindow() {
|
||||
// Store the current user selections.
|
||||
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;
|
||||
if(machine && !mainWindowCount) {
|
||||
MainWindow *const other = new MainWindow;
|
||||
other->show();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent *event) {
|
||||
if(mainWindowCount == 1 && machine) {
|
||||
qDebug() << "close, yah";
|
||||
}
|
||||
// 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.
|
||||
// if(mainWindowCount == 1 && machine) {
|
||||
// MainWindow *const other = new MainWindow;
|
||||
// other->show();
|
||||
// }
|
||||
QMainWindow::closeEvent(event);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user