From 8e9e536ffdac3c1d9a35331cc3a9073eac1de320 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 8 Dec 2019 17:42:56 +0100 Subject: mobile/divedetails: send current-dive changes up to mobile UI To unify mobile and desktop, let's use the current_dive variable of the core to indicate the current dive. Signed-off-by: Berthold Stoeger Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/DiveDetails.qml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mobile-widgets') diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index fbbda3516..541d1d0c0 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -334,6 +334,13 @@ Kirigami.Page { ScrollBar.vertical: ScrollBar { } } ScrollIndicator.horizontal: ScrollIndicator { } + Connections { + target: diveModel + onCurrentDiveChanged: { + currentIndex = index.row + diveDetailsListView.positionViewAtIndex(currentIndex, ListView.End) + } + } } } Flickable { -- cgit v1.2.3-70-g09d2