diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-12-21 20:41:06 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-10 09:25:57 -0700 |
commit | 69516c37ec076c20a41e747e83e01ce429729ec7 (patch) | |
tree | 44cd91907553f8a4835696c4aa35e68271e80f92 /mobile-widgets/qmlmanager.cpp | |
parent | dd8d8edc45dad1316aa5b5470247e14fb75d67e1 (diff) | |
download | subsurface-69516c37ec076c20a41e747e83e01ce429729ec7.tar.gz |
mobile/divelist: select dive after swipe
After swiping through the dive list, select the currently visible dive.
Thus, the dive is highlighted in the overview pane.
The connection with the QMLManager feels atrocious, but I would prefer to have
as little logic in QML as possible.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 0c434a4a9..c5b025dde 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -378,6 +378,12 @@ void QMLManager::selectRow(int row) select_single_dive(d); } +void QMLManager::selectSwipeRow(int row) +{ + dive *d = diveInRow(MobileModels::instance()->swipeModel(), row); + select_single_dive(d); +} + void QMLManager::updateSiteList() { LocationInformationModel::instance()->update(); |