summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/command.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-01-28 22:35:07 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-04-12 18:19:07 +0300
commit42cfd3f9638a5f9d37e51285e6d1eaaad3e78501 (patch)
treeda20dbdfd7358638df99a20eab392cf894f9d609 /desktop-widgets/command.cpp
parent512a2e6b684e237c5e6aacd3cba42fb7d2093e0a (diff)
downloadsubsurface-42cfd3f9638a5f9d37e51285e6d1eaaad3e78501.tar.gz
Undo: implement undo of rating and visibility rating
This was rather trivial and modeled after the previous edit UndoCommands. Since this is the first time we're editing integers a new constructor instantiation had to be added. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/command.cpp')
-rw-r--r--desktop-widgets/command.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/desktop-widgets/command.cpp b/desktop-widgets/command.cpp
index 7f18b343c..37c53235d 100644
--- a/desktop-widgets/command.cpp
+++ b/desktop-widgets/command.cpp
@@ -145,4 +145,14 @@ void editSuit(const QVector<dive *> dives, const QString &newValue, const QStrin
execute(new EditSuit(dives, newValue, oldValue));
}
+void editRating(const QVector<dive *> dives, int newValue, int oldValue)
+{
+ execute(new EditRating(dives, newValue, oldValue));
+}
+
+void editVisibility(const QVector<dive *> dives, int newValue, int oldValue)
+{
+ execute(new EditVisibility(dives, newValue, oldValue));
+}
+
} // namespace Command