aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mobile-widgets/qml/DiveDetails.qml1
-rw-r--r--mobile-widgets/qmlmanager.cpp6
-rw-r--r--mobile-widgets/qmlmanager.h1
3 files changed, 8 insertions, 0 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml
index 66e082163..616b4e724 100644
--- a/mobile-widgets/qml/DiveDetails.qml
+++ b/mobile-widgets/qml/DiveDetails.qml
@@ -313,6 +313,7 @@ Kirigami.Page {
highlightRangeMode: ListView.StrictlyEnforceRange
onMovementEnded: {
currentIndex = indexAt(contentX+1, 1);
+ manager.selectSwipeRow(currentIndex)
}
delegate: Flickable {
id: internalScrollView
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();
diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h
index 5a3662bfb..c5d480283 100644
--- a/mobile-widgets/qmlmanager.h
+++ b/mobile-widgets/qmlmanager.h
@@ -107,6 +107,7 @@ public:
Q_INVOKABLE void setGitLocalOnly(const bool &value);
Q_INVOKABLE void setFilter(const QString filterText, int mode);
Q_INVOKABLE void selectRow(int row);
+ Q_INVOKABLE void selectSwipeRow(int row);
static QMLManager *instance();
Q_INVOKABLE void registerError(QString error);