diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-12-08 17:42:56 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-10 09:25:57 -0700 |
commit | 8e9e536ffdac3c1d9a35331cc3a9073eac1de320 (patch) | |
tree | cf2185572478de81826ddb879f3237b92e69f8ad /mobile-widgets | |
parent | 1f669f9714ec87657eb276dc538822d8abbe77a5 (diff) | |
download | subsurface-8e9e536ffdac3c1d9a35331cc3a9073eac1de320.tar.gz |
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 <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qml/DiveDetails.qml | 7 |
1 files changed, 7 insertions, 0 deletions
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 { |