summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-10-22 21:57:02 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-10-26 11:38:26 -0700
commitbf6a644fc63a0eb9ae74ce55d31777ae7290056b (patch)
tree1033ee2f1a13e57de4675b8e376ccd20483e2546 /mobile-widgets
parent4c55074bd771240848967a183a3681bfc8e14b8c (diff)
downloadsubsurface-bf6a644fc63a0eb9ae74ce55d31777ae7290056b.tar.gz
Mobile: provide better tracking of applied GPS fixes
Also reset the page stack to make sure we don't end up with stale data. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/main.qml4
-rw-r--r--mobile-widgets/qmlmanager.cpp8
2 files changed, 10 insertions, 2 deletions
diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml
index 63c071766..cd8635b63 100644
--- a/mobile-widgets/qml/main.qml
+++ b/mobile-widgets/qml/main.qml
@@ -292,6 +292,10 @@ Kirigami.ApplicationWindow {
globalDrawer.close()
diveModel.resetInternalData()
manager.refreshDiveList()
+ while (pageStack.depth > 1) {
+ pageStack.pop()
+ }
+ pageStack.push(diveList)
}
}
Kirigami.Action {
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 42bb24f70..b69783e95 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -1577,8 +1577,12 @@ QString QMLManager::getCurrentPosition()
void QMLManager::applyGpsData()
{
- if (locationProvider->applyLocations())
- refreshDiveList();
+ appendTextToLog("Applying GPS fiexs");
+ int cnt = locationProvider->applyLocations();
+ if (cnt == 0)
+ return;
+ appendTextToLog(QString("Attached %1 GPS fixes").arg(cnt));
+ refreshDiveList();
}
void QMLManager::populateGpsData()