diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-01-28 18:35:27 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-12 18:19:07 +0300 |
commit | f11ac405933f2bc124dcff05ec44dd6860cf712c (patch) | |
tree | 502d7f9880076455324bb762e011555f7f452ae2 /desktop-widgets/command.h | |
parent | 45ef87954669c765cb7b317384066c6eb88dc5d3 (diff) | |
download | subsurface-f11ac405933f2bc124dcff05ec44dd6860cf712c.tar.gz |
Undo: implement undo of dive mode editing
Add a new UndoCommand for dive mode editing. This one is a bit
special, as the mode is associated with a dive computer (DC),
not a dive. Thus the edit command has an additional parameter,
viz. the index of the DC.
This does not fit properly to the EditBase class, as this class
isn't aware of additional parameters and therefore this parameter
is not sent via signals. At the moment this doesn't matter. In
any case, the semantics of editing are weird and therefore let's
do the simple thing (derive from EditBase) and let's see what
the future brings.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/command.h')
-rw-r--r-- | desktop-widgets/command.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/desktop-widgets/command.h b/desktop-widgets/command.h index 4c31baa6e..e1139bd99 100644 --- a/desktop-widgets/command.h +++ b/desktop-widgets/command.h @@ -53,6 +53,7 @@ void purgeUnusedDiveSites(); // 4) Dive editing related commands void editNotes(const QVector<dive *> dives, const QString &newValue, const QString &oldValue); +void editMode(const QVector<dive *> dives, int index, int newValue, int oldValue); } // namespace Command |