summaryrefslogtreecommitdiffstats
path: root/qt-ui/undocommands.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-02 14:50:12 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-02 14:50:12 -0400
commita94c84d5982a10cd9adfd421aed41cf159dd3303 (patch)
treeedbaea3f89cad4e03f4ed2126de3e0c4bb07c2a7 /qt-ui/undocommands.h
parent7c427dcc020064e0ea867c77ee86db6e1f4755bb (diff)
downloadsubsurface-a94c84d5982a10cd9adfd421aed41cf159dd3303.tar.gz
Undo/redo of dive deletion needs to handle trips as well
If we delete dives that were part of a trip, that trip may get deleted as well. So if we undo that operation we need to bring back the trip, too. This also deals with a bug in the original code that did the delete both in calling code (in divelistview.cpp) and in the redo function. Because of the nature of the delete this didn't really matter but it is of course wrong and with the new code it would in fact cause an issue. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/undocommands.h')
-rw-r--r--qt-ui/undocommands.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-ui/undocommands.h b/qt-ui/undocommands.h
index 62fb2d22b..8e359db51 100644
--- a/qt-ui/undocommands.h
+++ b/qt-ui/undocommands.h
@@ -13,6 +13,7 @@ public:
private:
QList<struct dive*> diveList;
+ QList<struct dive_trip*> tripList;
};
class UndoShiftTime : public QUndoCommand {