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>
This commit is contained in:
Dirk Hohndel 2016-01-06 21:58:02 -08:00
parent e5f95daee8
commit 5860913e41

View file

@ -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;