aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-17 11:29:22 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-19 12:42:47 -0800
commit0a632e12d29ca3c5a18bc22337fe44a637a1c10b (patch)
treee5b394d11e99e2f7d0cc381eee7dc9ae88f48d3d /mobile-widgets
parent1913e97bf209ab1015cc7f6683624e020ba5ec33 (diff)
downloadsubsurface-0a632e12d29ca3c5a18bc22337fe44a637a1c10b.tar.gz
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 <peter.zaal@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/DiveDetails.qml4
1 files changed, 2 insertions, 2 deletions
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