From 0a632e12d29ca3c5a18bc22337fe44a637a1c10b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 17 Jan 2021 11:29:22 -0800 Subject: mobile/UI: move dive delete to context menu Having this as the right action button (same one used for 'cancel' in the edit screen) made it too likely to inadvertantly delete a dive. And outside of testing, wanting to delete a dive really shouldn't be all that common an operation. So remove the function from the action button and place it into the context menu instead, right next to the undo action so the user also is aware that there is an undo option. Suggested-by: Peter Zaal Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/DiveDetails.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mobile-widgets') diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index e505d7bc1..1215e86ad 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -115,7 +115,7 @@ Kirigami.Page { enabled: manager.redoText !== "" onTriggered: manager.redo() } - property variant contextactions: [ removeDiveFromTripAction, addDiveToTripAboveAction, addDiveToTripBelowAction, undoAction, redoAction ] + property variant contextactions: [ removeDiveFromTripAction, addDiveToTripAboveAction, addDiveToTripBelowAction, deleteAction, undoAction, redoAction ] states: [ State { @@ -123,7 +123,7 @@ Kirigami.Page { PropertyChanges { target: diveDetailsPage; actions { - right: deleteAction + right: null left: currentItem ? (currentItem.modelData && currentItem.modelData.gps !== "" ? mapAction : null) : null } contextualActions: contextactions -- cgit v1.2.3-70-g09d2