mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Mobile: set units system in "No cloud mode"
When starting the app in "No cloud mode" we need to make sure that the units and unit_system match. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a63be142b5
commit
5cb31d6adb
1 changed files with 5 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include "core/membuffer.h"
|
#include "core/membuffer.h"
|
||||||
#include "core/gpslocation.h"
|
#include "core/gpslocation.h"
|
||||||
|
#include "core/settings/qPrefUnit.h"
|
||||||
|
|
||||||
|
|
||||||
/*** Global and constructors ***/
|
/*** Global and constructors ***/
|
||||||
|
@ -78,6 +79,10 @@ void QMLPrefs::setCredentialStatus(const qPrefCloudStorage::cloud_status value)
|
||||||
QMLManager::instance()->appendTextToLog("Switching to no cloud mode");
|
QMLManager::instance()->appendTextToLog("Switching to no cloud mode");
|
||||||
set_filename(NOCLOUD_LOCALSTORAGE);
|
set_filename(NOCLOUD_LOCALSTORAGE);
|
||||||
clearCredentials();
|
clearCredentials();
|
||||||
|
if (qPrefUnits::unit_system() == "imperial")
|
||||||
|
prefs.units = IMPERIAL_units;
|
||||||
|
else if (qPrefUnits::unit_system() == "metric")
|
||||||
|
prefs.units = SI_units;
|
||||||
}
|
}
|
||||||
m_credentialStatus = value;
|
m_credentialStatus = value;
|
||||||
emit credentialStatusChanged();
|
emit credentialStatusChanged();
|
||||||
|
|
Loading…
Reference in a new issue