summaryrefslogtreecommitdiffstats
path: root/commands/command.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-11-08 22:47:38 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-05 10:14:25 -0800
commit72c6b838662f1fb79a806ac2264c7215efa0aa67 (patch)
tree8b10fe7ad548a62ed428347c8a35882ee291b41a /commands/command.h
parent029c9ccf020fdb73c148da489e0e7b1acd3ca149 (diff)
downloadsubsurface-72c6b838662f1fb79a806ac2264c7215efa0aa67.tar.gz
Undo: make weight editing undoable
Implement the EditWeight undo command. Since there is common code (storage of the old weight), this creates a common base class for RemoveWeight and EditWeight. The model calls directly into the undo command, which is somewhat unfortunate as it feels like a layering violation. It's the easy thing to do for now. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'commands/command.h')
-rw-r--r--commands/command.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/commands/command.h b/commands/command.h
index 5c60ac316..0f93a3e85 100644
--- a/commands/command.h
+++ b/commands/command.h
@@ -83,6 +83,7 @@ void replanDive(dive *d); // dive computer(s) and cylinder(s) will be reset!
void editProfile(dive *d); // dive computer(s) and cylinder(s) will be reset!
int addWeight(bool currentDiveOnly);
int removeWeight(int index, bool currentDiveOnly);
+int editWeight(int index, weightsystem_t ws, bool currentDiveOnly);
// 5) Trip editing commands