diff options
Diffstat (limited to 'mobile-widgets/qml/DiveDetails.qml')
-rw-r--r-- | mobile-widgets/qml/DiveDetails.qml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index 44c64042e..5bed0f5ef 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -59,7 +59,14 @@ Kirigami.Page { background: Rectangle { color: subsurfaceTheme.backgroundColor } width: rootItem.colWidth - property QtObject removeDiveFromTripAction: Kirigami.Action { text: qsTr ("Remove dive from trip <TBD>") } + property QtObject removeDiveFromTripAction: Kirigami.Action { + text: qsTr ("Remove this dive from trip") + enabled: currentItem && currentItem.modelData.diveInTrip + onTriggered: { + manager.appendTextToLog("remove dive #" + currentItem.modelData.number + " from its trip") + manager.removeDiveFromTrip(currentItem.modelData.id) + } + } property QtObject addDiveToTripAction: Kirigami.Action { text: qsTr ("Add dive to trip <TBD>") } property QtObject undoAction: Kirigami.Action { text: qsTr("Undo") + " " + manager.undoText |