diff options
-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); |