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>
This commit is contained in:
Dirk Hohndel 2020-03-26 16:48:45 -07:00
parent 302404dac0
commit 60d2d051bb

View file

@ -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" }