mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
ab8e317b28
commit
3d511b069f
5 changed files with 49 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue