diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-03-04 21:10:05 +0100 |
---|---|---|
committer | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-07 00:13:35 +0200 |
commit | 0bd821183d715f709d378e8ac1a75aa0c3d0f2cc (patch) | |
tree | e6d182e6922d7c06bf09b17c9c953f8b5dc78e85 /commands/command.cpp | |
parent | c585fd9f8ee0c1f27f997b4e19984b50d150f6cb (diff) | |
download | subsurface-0bd821183d715f709d378e8ac1a75aa0c3d0f2cc.tar.gz |
undo: implement gas switch
This is a bit hairy as - in theory - one gas switch can remove
other gas switch(es) at the same timestamp. However, I did not
find a way to test it. Moreover, it is not clear whether the
dive-tabs are properly updated on undo/redo.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'commands/command.cpp')
-rw-r--r-- | commands/command.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/commands/command.cpp b/commands/command.cpp index 54f9b22f9..c173494c0 100644 --- a/commands/command.cpp +++ b/commands/command.cpp @@ -354,4 +354,9 @@ void removeEvent(struct dive *d, int dcNr, struct event *ev) execute(new RemoveEvent(d, dcNr, ev)); } +void addGasSwitch(struct dive *d, int dcNr, int seconds, int tank) +{ + execute(new AddGasSwitch(d, dcNr, seconds, tank)); +} + } // namespace Command |