mainwindow.cpp: don't close a file if a dive site is being edited

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Lubomir I. Ivanov 2015-02-14 20:36:15 +02:00 committed by Dirk Hohndel
parent 0f2d0211c3
commit cbff3f89c9

View file

@ -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;
}