diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-03-04 18:25:47 +0100 |
---|---|---|
committer | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-07 00:13:35 +0200 |
commit | 3d511b069f5e2c659ed5af039485b1c72c348b8a (patch) | |
tree | c02a1a171ca1cee4b1c7553c07cbcc8e98a92329 /commands/command_event.h | |
parent | ab8e317b28672cc19fd04e994b9adf9b63f0c603 (diff) | |
download | subsurface-3d511b069f5e2c659ed5af039485b1c72c348b8a.tar.gz |
undo: add event removal undo command
This was a trivial copy & past of the event-adding undo command
with a switch of the undo() and redo() actions.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'commands/command_event.h')
-rw-r--r-- | commands/command_event.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/commands/command_event.h b/commands/command_event.h index ddfe6f7d4..eec5cb262 100644 --- a/commands/command_event.h +++ b/commands/command_event.h @@ -70,6 +70,18 @@ private: event *eventToRemove; // for undo and redo }; +class RemoveEvent : public EventBase { +public: + RemoveEvent(struct dive *d, int dcNr, struct event *ev); +private: + bool workToBeDone() override; + void undoit() override; + void redoit() override; + + OwningEventPtr eventToAdd; // for undo + event *eventToRemove; // for redo +}; + } // namespace Command #endif // COMMAND_EVENT_H |