diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-02-21 09:56:21 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-10 09:25:57 -0700 |
commit | 7fc43c58bee8212217e2c0ba9c9dcc15b56171d4 (patch) | |
tree | 9ca88a04362f89afd2fca6207b50b52860abb20f /mobile-widgets/qml/DiveList.qml | |
parent | 289d4512947a6ce40fb4a9f6c6af710d1a0fea25 (diff) | |
download | subsurface-7fc43c58bee8212217e2c0ba9c9dcc15b56171d4.tar.gz |
mobile/dive-list: long press on dive selects and opens context drawer
This way one can execute dive list manipulations without the detour
to the dive details screen. For example you can long-press on a dive and then
add it to a trip or remove it from a trip.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml/DiveList.qml')
-rw-r--r-- | mobile-widgets/qml/DiveList.qml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index 7ecd9287a..f09609a73 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -74,6 +74,18 @@ Kirigami.ScrollablePage { } } } + // use this to select a dive without switching to dive details; instead open context drawer + onPressAndHold: { + view.currentIndex = index + if (isTrip) { + manager.appendTextToLog("press and hold on trip is same as click") + manager.toggle(model.row) + } else { + manager.appendTextToLog("press and hold on dive; open context drawer") + manager.selectRow(model.row) + contextDrawer.open() + } + } // first we look at the trip Item { |