aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/command.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-07-17 15:49:45 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-07-19 21:44:13 -0700
commit726d08c2f71920acd8e5cc9b2d6850d1249466aa (patch)
tree3f9e03edb013a0c5f994efce607740fdacf80261 /desktop-widgets/command.h
parent658ac2bb788bb3617972d6108ef6fe6a277ef3ae (diff)
downloadsubsurface-726d08c2f71920acd8e5cc9b2d6850d1249466aa.tar.gz
Undo: make editing of dive number undoable
When pressing F2 in the dive list, the number can be edited. Make this action undoable by implementing a EditNumber command. This command is differs from the other undo commands, as not the currently selected dives are changed. This means that the EditCommand needs an alternative constructor taking a single dive. This constructor was implemented in the base class so that all edit commands can now be called with a single dive. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/command.h')
-rw-r--r--desktop-widgets/command.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/desktop-widgets/command.h b/desktop-widgets/command.h
index fec5d76a9..fa4ce2a45 100644
--- a/desktop-widgets/command.h
+++ b/desktop-widgets/command.h
@@ -60,6 +60,7 @@ void purgeUnusedDiveSites();
int editNotes(const QString &newValue, bool currentDiveOnly);
int editSuit(const QString &newValue, bool currentDiveOnly);
int editMode(int index, int newValue, bool currentDiveOnly);
+int editNumber(int newValue, bool currentDiveOnly);
int editRating(int newValue, bool currentDiveOnly);
int editVisibility(int newValue, bool currentDiveOnly);
int editAirTemp(int newValue, bool currentDiveOnly);