From b6fce3f5562178b22e44dbe72742e9674e43e4cc Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 3 Jun 2014 18:22:22 -0700 Subject: Closing the window should behave like triggering Quit It seems odd to have different behavior depending on whether the window manager tells us that the user wants to close the window or whether the user hits quit or ctrl-q. Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 92d5f6d7c..f6dd1b37f 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -802,7 +802,7 @@ void MainWindow::closeEvent(QCloseEvent *event) { if (DivePlannerPointsModel::instance()->currentMode() != DivePlannerPointsModel::NOTHING || ui.InfoWidget->isEditing()) { - QMessageBox::warning(this, tr("Warning"), tr("Please save or cancel the current dive edit before closing the file.")); + on_actionQuit_triggered(); event->ignore(); return; } -- cgit v1.2.3-70-g09d2