summaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-14 18:36:21 +0900
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-14 18:36:21 +0900
commitf6eb26dbae7be8a5a8482127ee331ee863f13fc3 (patch)
tree90cc0b128c2a2eceed20301bbcdd5391c0455684 /qt-ui/maintab.cpp
parentdfd17c7a7fd1f5dd85f61a6feef96c616e02cfcb (diff)
downloadsubsurface-f6eb26dbae7be8a5a8482127ee331ee863f13fc3.tar.gz
Handle tank data correctly in profile editing mode for manually added dive
This is subtle. Normally you would expect someone to edit the tank data by simply clicking on it in the equipment tab. But a user could conceivably edit the tank data after clicking on the profile editing button instead. This works now as well. This also addresses the issue that start and end pressure were not shown in profile editing mode. Fixes #235 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 005efe496..f53defbbf 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -474,7 +474,9 @@ void MainTab::acceptChanges()
if (notesBackup[curr].tags != ui.tagWidget->text())
saveTags();
- if (editMode != ADD && cylindersModel->changed) {
+ if (editMode == MANUALLY_ADDED_DIVE) {
+ DivePlannerPointsModel::instance()->copyCylinders(curr);
+ } else if (editMode != ADD && cylindersModel->changed) {
mark_divelist_changed(TRUE);
Q_FOREACH (dive *d, notesBackup.keys()) {
for (int i = 0; i < MAX_CYLINDERS; i++) {