From 0e96c9f62e3a7030d9208f32e59390cb3fd20bbe Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 1 Nov 2013 14:06:03 -0400 Subject: 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 --- qt-ui/maintab.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qt-ui/maintab.cpp') 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); -- cgit v1.2.3-70-g09d2