aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/divelistview.cpp
diff options
context:
space:
mode:
authorGravatar Grace Karanja <gracie.karanja89@gmail.com>2015-02-11 09:10:34 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-11 07:59:46 -0800
commit013da6b0af3e3dd5d074f2dbbc342d9b948717b4 (patch)
tree4bc4cf314e0088f1c76736e45d3d7dcb817a0baf /qt-ui/divelistview.cpp
parent6374d9cc0334c7dc7af908b4cb9233a091a48740 (diff)
downloadsubsurface-013da6b0af3e3dd5d074f2dbbc342d9b948717b4.tar.gz
Reverse undo buffer
Reverse all the code using the UndoBuffer class so that we can use the QUndoStack and QUndoCommand classes. These are Qt's own inbuild undo framework classes, offering a better undo/redo process. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelistview.cpp')
-rw-r--r--qt-ui/divelistview.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index 6d8642272..b866a1aa1 100644
--- a/qt-ui/divelistview.cpp
+++ b/qt-ui/divelistview.cpp
@@ -14,7 +14,6 @@
#include <QKeyEvent>
#include <QFileDialog>
#include "qthelper.h"
-#include "undobuffer.h"
// # Date Rtg Dpth Dur Tmp Wght Suit Cyl Gas SAC OTU CNS Loc
static int defaultWidth[] = { 70, 140, 90, 50, 50, 50, 50, 70, 50, 50, 70, 50, 50, 500};
@@ -735,9 +734,6 @@ void DiveListView::deleteDive()
for_each_dive (i, d) {
if (!d->selected)
continue;
- struct dive* undo_entry = alloc_dive();
- copy_dive(get_dive(i), undo_entry);
- MainWindow::instance()->undoBuffer->recordbefore("Delete Dive", undo_entry);
delete_single_dive(i);
i--; // so the next dive isn't skipped... it's now #i
lastDiveNr = i;