summaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2013-11-01 14:06:03 -0400
committerGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2013-11-01 14:06:03 -0400
commit0e96c9f62e3a7030d9208f32e59390cb3fd20bbe (patch)
tree309804693d8c0b272343c8cd767a01baedb4e33f /qt-ui/maintab.cpp
parent23a193b0d1a94098ebcf1b5bafbc79ed879b5106 (diff)
downloadsubsurface-0e96c9f62e3a7030d9208f32e59390cb3fd20bbe.tar.gz
Enable undo for the Edit mode on Added Dives.
This enables undo for the edit mode on added dives, it uses the premade backup to fill the old dive with data. :) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index f88d7c6d0..ddcdc6c63 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -507,6 +507,9 @@ void MainTab::rejectChanges()
delete_single_dive(selected_dive);
DivePlannerPointsModel::instance()->cancelPlan();
}
+ else if (editMode == MANUALLY_ADDED_DIVE ){
+ DivePlannerPointsModel::instance()->undoEdition();
+ }
struct dive *curr = current_dive;
ui.notes->setText(notesBackup[curr].notes );
ui.location->setText(notesBackup[curr].location);