summaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
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 16350f709..7c94ab4c8 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -565,7 +565,9 @@ void MainTab::rejectChanges()
// clean up
DivePlannerPointsModel::instance()->cancelPlan();
} else if (lastMode == MANUALLY_ADDED_DIVE ) {
- DivePlannerPointsModel::instance()->undoEdition(); // that's BOGUS... just copy the original dive back and be done with it...
+ // when we tried to edit a manually added dive, we destroyed
+ // the dive we edited, so let's just restore it from backup
+ DivePlannerPointsModel::instance()->restoreBackupDive();
}
struct dive *curr = current_dive;
ui.notes->setText(notesBackup[curr].notes );