From 5860913e41b5dbbeb2c8d73f875c0e484cf3ef37 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 6 Jan 2016 21:58:02 -0800 Subject: QML UI: use the same units that Subsurface used when saving the data We already keep those units around so the backend HTML exporter can match them. So it makes perfect sense to also apply them in the mobile app. Fixes #987 Signed-off-by: Dirk Hohndel --- qt-mobile/qmlmanager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp index a786c93c2..00f8b5d48 100644 --- a/qt-mobile/qmlmanager.cpp +++ b/qt-mobile/qmlmanager.cpp @@ -73,6 +73,8 @@ void QMLManager::finishSetup() if (error) { appendTextToLog(QString("loading dives from cache failed %1").arg(error)); } else { + prefs.unit_system = informational_prefs.unit_system; + prefs.units = informational_prefs.units; int i; struct dive *d; process_dives(false, false); @@ -291,6 +293,8 @@ void QMLManager::loadDivesWithValidCredentials() setStartPageText(tr("Cloud storage error: %1").arg(errorString)); return; } + prefs.unit_system = informational_prefs.unit_system; + prefs.units = informational_prefs.units; process_dives(false, false); int i; -- cgit v1.2.3-70-g09d2