mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 23:52:26 +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.
|
// 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user