diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-07-31 14:41:30 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-07-31 14:41:30 -0700 |
commit | 13d922aef7f838c013f1d8eff7771d7b59cf0457 (patch) | |
tree | c66f784318b48c9c628042775a03f7da942615a6 | |
parent | e32bdad8e94bfd92e91ebe05fb6276b16ff279a1 (diff) | |
download | subsurface-13d922aef7f838c013f1d8eff7771d7b59cf0457.tar.gz |
Keep edited profile after editing a manually added dive
This is yet another unintended side effect of the UI restructure changes.
I stared at this code for so long - I can't believe I kept missing this.
Fixes #668
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/maintab.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index d57a14b13..0ed6c5dbf 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -664,6 +664,11 @@ void MainTab::acceptChanges() currentTrip = NULL; ui.dateEdit->setEnabled(true); } else { + if (editMode == MANUALLY_ADDED_DIVE) { + // preserve any changes to the profile + free(current_dive->dc.sample); + copy_samples(&displayed_dive.dc, ¤t_dive->dc); + } struct dive *cd = current_dive; //Reset coordinates field, in case it contains garbage. updateGpsCoordinates(&displayed_dive); |