diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-03-03 22:34:50 +0100 |
---|---|---|
committer | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-07 00:13:35 +0200 |
commit | 30c7499a3c656784cc45825b4b1b2fca61081308 (patch) | |
tree | 32f8ad2c085e3a1706ed0994c0f39eadde39830d /commands/command.cpp | |
parent | 3aa1bb5bfae9a7ebf8f5e6cdbf751afcafdb4baf (diff) | |
download | subsurface-30c7499a3c656784cc45825b4b1b2fca61081308.tar.gz |
undo: implement addBookmark undo command
Create a new translation unit for event-related undo commands.
Create a base class of commands that add events and one subclass
that adds a bookmark event.
Use this command in the profile-widget.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'commands/command.cpp')
-rw-r--r-- | commands/command.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/commands/command.cpp b/commands/command.cpp index 5d71e6725..e9b4e0738 100644 --- a/commands/command.cpp +++ b/commands/command.cpp @@ -5,6 +5,7 @@ #include "command_divesite.h" #include "command_edit.h" #include "command_edit_trip.h" +#include "command_event.h" namespace Command { @@ -326,4 +327,11 @@ void editDive(dive *oldDive, dive *newDive, dive_site *createDs, dive_site *chan } #endif // SUBSURFACE_MOBILE +// Event commands + +void addEventBookmark(struct dive *d, int dcNr, int seconds) +{ + execute(new AddEventBookmark(d, dcNr, seconds)); +} + } // namespace Command |