From cbff3f89c9c362732441ebf6dbd3b0117dfe7b61 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 14 Feb 2015 20:36:15 +0200 Subject: mainwindow.cpp: don't close a file if a dive site is being edited Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 56f885409..59e664db3 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -338,7 +338,8 @@ void MainWindow::cleanUpEmpty() bool MainWindow::okToClose(QString message) { if (DivePlannerPointsModel::instance()->currentMode() != DivePlannerPointsModel::NOTHING || - information()->isEditing()) { + information()->isEditing() || + currentApplicationState == "EditDiveSite") { QMessageBox::warning(this, tr("Warning"), message); return false; } -- cgit v1.2.3-70-g09d2