summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/DiveDetails.qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-11 15:27:53 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-10 09:25:57 -0700
commit28bf078ff7da221d4172fa64ad20c0a57218eaba (patch)
tree65b855b499d3fd4f71f3923acd980a4a587c1d24 /mobile-widgets/qml/DiveDetails.qml
parentaf4bd16f88f6bedaf5d7387844ab4b8d5b1848cc (diff)
downloadsubsurface-28bf078ff7da221d4172fa64ad20c0a57218eaba.tar.gz
mobile UI: add context menu to DiveDetails
The undo and redo action actually work already. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml/DiveDetails.qml')
-rw-r--r--mobile-widgets/qml/DiveDetails.qml14
1 files changed, 14 insertions, 0 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml
index a886a2c50..2a20271ef 100644
--- a/mobile-widgets/qml/DiveDetails.qml
+++ b/mobile-widgets/qml/DiveDetails.qml
@@ -193,6 +193,20 @@ Kirigami.Page {
}
}
+ contextualActions: [
+ Kirigami.Action {
+ text: qsTr("Undo") + " " + manager.undoText
+ enabled: manager.undoText !== ""
+ onTriggered: manager.undo()
+ },
+ Kirigami.Action {
+ text: qsTr("Redo") + " " + manager.redoText
+ enabled: manager.redoText !== ""
+ onTriggered: manager.redo()
+ }
+ ]
+
+
onBackRequested: {
if (state === "edit") {
endEditMode()