aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/command.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-05-19 14:27:10 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-05-20 21:23:16 -0700
commit0bc96905bf92de5e7bac88efde181d93d95998f1 (patch)
treedbfda7a6c615d0b8452bb6ae87e3d98c618df40f /desktop-widgets/command.cpp
parenteba6e76b963115a77b5f8607bc6c3ea1040a466f (diff)
downloadsubsurface-0bc96905bf92de5e7bac88efde181d93d95998f1.tar.gz
Undo: make "delete dive computer" undoable
Simply reuse the code for "move dive computer" by creating a DiveComputerBase base class. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/command.cpp')
-rw-r--r--desktop-widgets/command.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/desktop-widgets/command.cpp b/desktop-widgets/command.cpp
index b6283ec8d..df1ae299d 100644
--- a/desktop-widgets/command.cpp
+++ b/desktop-widgets/command.cpp
@@ -79,6 +79,11 @@ void moveDiveComputerToFront(dive *d, int dc_num)
execute(new MoveDiveComputerToFront(d, dc_num));
}
+void deleteDiveComputer(dive *d, int dc_num)
+{
+ execute(new DeleteDiveComputer(d, dc_num));
+}
+
void mergeDives(const QVector <dive *> &dives)
{
execute(new MergeDives(dives));