summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2014-02-19 19:43:34 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-20 09:22:43 -0800
commit78c68518f8ad922b6b2261d7be6c9683aebba7b2 (patch)
tree6faa4004b3683f6afa12f08793fafa37f9d9d28f
parent508cbc82b8695b6dd9db16df17fb398cc95094c5 (diff)
downloadsubsurface-78c68518f8ad922b6b2261d7be6c9683aebba7b2.tar.gz
Clear edit mode for manually added dives
Edit mode must be cleared for manually added dives as well when one hits cancel or save. Fixes #437 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/maintab.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index d878a68e9..554b3ccc6 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -680,6 +680,7 @@ void MainTab::acceptChanges()
MainWindow::instance()->refreshDisplay();
MainWindow::instance()->dive_list()->restoreSelection();
}
+ DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::NOTHING);
MainWindow::instance()->dive_list()->verticalScrollBar()->setSliderPosition(scrolledBy);
MainWindow::instance()->dive_list()->setFocus();
}
@@ -803,8 +804,8 @@ void MainTab::rejectChanges()
MainWindow::instance()->showProfile();
// we already reloaded the divelist above, so don't recreate it or we'll lose the selection
MainWindow::instance()->refreshDisplay(false);
- DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::NOTHING);
}
+ DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::NOTHING);
MainWindow::instance()->dive_list()->setFocus();
}
#undef EDIT_TEXT2