From 33668ffd3501f9e80af9e7260bc98970fa5b8900 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 17 Dec 2013 06:45:31 -0800 Subject: Don't enter edit profile mode when already editing the dive This is not the ideal solution. Ideally we might want to simply enter the profile edit mode if we edit a dive that was manually added. But right now the code contains lots of assumptions about being in one mode or the other and as we are redoing the profile / planner classes for 4.1 anyway, I'd rather err on the safe side for 4.0.1 Fixes #374 (well, it fixes the second bug reported in 374 which is quite different from the original bug) Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui/mainwindow.cpp') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index fbe37793b..f4f97f92d 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -870,7 +870,7 @@ void MainWindow::on_actionImportCSV_triggered() void MainWindow::editCurrentDive() { - if(DivePlannerPointsModel::instance()->currentMode() != DivePlannerPointsModel::NOTHING){ + if(information()->isEditing() || DivePlannerPointsModel::instance()->currentMode() != DivePlannerPointsModel::NOTHING){ QMessageBox::warning(this, tr("Warning"), tr("First finish the current edition before trying to do another.")); return; } -- cgit v1.2.3-70-g09d2