diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-03-26 16:48:45 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-26 16:48:48 -0700 |
commit | 60d2d051bbcc3f4abad9ea1bcb14c19092d79d97 (patch) | |
tree | 108e6eede9d7c55ccbdea3e3e6b4e9d90f52832f | |
parent | 302404dac04be24191115469890bfa9d5e6a9e83 (diff) | |
download | subsurface-60d2d051bbcc3f4abad9ea1bcb14c19092d79d97.tar.gz |
mobile UI: add create trip to DiveDetails context menu
Should have done that in the first place. That's what happens when you
are rushing it...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | mobile-widgets/qml/DiveDetails.qml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index b70bb0045..4636e5ee0 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -86,6 +86,14 @@ Kirigami.Page { manager.addDiveToTrip(currentItem.modelData.id, currentItem.modelData.tripBelow) } } + property QtObject createTripForDiveAction: Kirigami.Action { + text: qsTr("Create trip with dive") + icon { name: ":/icons/list-add" } + enabled: currentItem && currentItem.modelData && !currentItem.modelData.isTrip && currentItem.modelData.isTopLevel + onTriggered: { + manager.addTripForDive(currentItem.myData.id) + } + } property QtObject undoAction: Kirigami.Action { text: qsTr("Undo") + " " + manager.undoText icon { name: ":/icons/undo.svg" } |