aboutsummaryrefslogtreecommitdiffstats
path: root/commands/command.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-03-27 21:09:59 +0100
committerGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-04-07 00:13:35 +0200
commit2eeb5f4fc2d6da8a8c8950f0b479b7cb2055af07 (patch)
tree8992165c39f4926e2d5896e0549d3fc7ba9aa42c /commands/command.cpp
parent4e8a838f746d7319b97b56a209651a65655aca7f (diff)
downloadsubsurface-2eeb5f4fc2d6da8a8c8950f0b479b7cb2055af07.tar.gz
undo: more fine-grained editing of cylinder
Don't overwrite the full cylinder when editing a single field. Implement three "modes": editing of type, pressure and gasmix. Don't consider individual fields, because some of them are related. E.g. you can change the gasmix by setting the MOD. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'commands/command.cpp')
-rw-r--r--commands/command.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/command.cpp b/commands/command.cpp
index c173494c0..33c866e72 100644
--- a/commands/command.cpp
+++ b/commands/command.cpp
@@ -304,9 +304,9 @@ int removeCylinder(int index, bool currentDiveOnly)
return execute_edit(new RemoveCylinder(index, currentDiveOnly));
}
-int editCylinder(int index, cylinder_t cyl, bool currentDiveOnly)
+int editCylinder(int index, cylinder_t cyl, EditCylinderType type, bool currentDiveOnly)
{
- return execute_edit(new EditCylinder(index, cyl, currentDiveOnly));
+ return execute_edit(new EditCylinder(index, cyl, type, currentDiveOnly));
}
// Trip editing related commands