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