aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-17 06:45:31 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-17 06:45:31 -0800
commit33668ffd3501f9e80af9e7260bc98970fa5b8900 (patch)
treee9859e6275a93fc12c826574464468725bdbfe32 /qt-ui/mainwindow.cpp
parentfe88a2a4765c45bcea8387438574f9c1014997b8 (diff)
downloadsubsurface-33668ffd3501f9e80af9e7260bc98970fa5b8900.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}