diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-01-06 21:58:02 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-01-06 21:58:02 -0800 |
commit | 5860913e41b5dbbeb2c8d73f875c0e484cf3ef37 (patch) | |
tree | 69240ee8ac36a736384b5ca7718a02fcb25e7ff8 /qt-mobile | |
parent | e5f95daee80a45f4300c129e38a2681d83bef3d7 (diff) | |
download | subsurface-5860913e41b5dbbeb2c8d73f875c0e484cf3ef37.tar.gz |
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 <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile')
-rw-r--r-- | qt-mobile/qmlmanager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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; |