diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-11-13 22:27:03 +0900 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-13 22:27:03 +0900 |
commit | c18464b44f157c9bbea69bb479dc3282237ad3a3 (patch) | |
tree | 65f3b3d80d8ba1b9435c36f038510245a2088806 /qt-ui/maintab.cpp | |
parent | dee1645de010611b4571df0ef6678ee2a3115655 (diff) | |
download | subsurface-c18464b44f157c9bbea69bb479dc3282237ad3a3.tar.gz |
Don't overwrite the new cylinders when adding a dive
We carefully assembled the correct data in the cylinders - don't replace
that data when manually editing a dive.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r-- | qt-ui/maintab.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 961686fb9..bd10ed356 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -474,8 +474,7 @@ void MainTab::acceptChanges() if (notesBackup[curr].tags != ui.tagWidget->text()) saveTags(); - - if (cylindersModel->changed) { + if (editMode != ADD && cylindersModel->changed) { mark_divelist_changed(TRUE); Q_FOREACH (dive *d, notesBackup.keys()) { for (int i = 0; i < MAX_CYLINDERS; i++) { @@ -494,6 +493,7 @@ void MainTab::acceptChanges() } } + save_dive(stdout, current_dive); if (editMode == ADD || editMode == MANUALLY_ADDED_DIVE) { // clean up the dive data (get duration, depth information from samples) fixup_dive(current_dive); |