summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/command.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-10-06 20:54:25 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-10-26 11:36:23 -0700
commit7b730602c6ac92c561c5ccb6a0dbf725a70fa963 (patch)
tree7f3f6e9b7f59d82db0ab56240b565918ba0d5cf5 /desktop-widgets/command.cpp
parent6a6b992a7767c2ab4eee83a23d0c17caf979f66f (diff)
downloadsubsurface-7b730602c6ac92c561c5ccb6a0dbf725a70fa963.tar.gz
Undo: implement ReplanDive command
Implement an undo command that overwrites the dive-computers and cylinders of the current dive with a given dive. This will be used when replanning a dive. 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 cf8aeb7f9..4257324ec 100644
--- a/desktop-widgets/command.cpp
+++ b/desktop-widgets/command.cpp
@@ -238,6 +238,11 @@ void pasteDives(const dive *d, dive_components what)
execute(new PasteDives(d, what));
}
+void replanDive(dive *d)
+{
+ execute(new ReplanDive(d));
+}
+
// Trip editing related commands
void editTripLocation(dive_trip *trip, const QString &s)
{