diff options
Diffstat (limited to 'core/subsurface-qt/SettingsObjectWrapper.cpp')
-rw-r--r-- | core/subsurface-qt/SettingsObjectWrapper.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/core/subsurface-qt/SettingsObjectWrapper.cpp b/core/subsurface-qt/SettingsObjectWrapper.cpp index 8c8762b65..42be027d6 100644 --- a/core/subsurface-qt/SettingsObjectWrapper.cpp +++ b/core/subsurface-qt/SettingsObjectWrapper.cpp @@ -1636,8 +1636,8 @@ void UnitsSettings::setCoordinatesTraditional(bool value) void UnitsSettings::setUnitSystem(const QString& value) { short int v = value == QStringLiteral("metric") ? METRIC - : value == QStringLiteral("imperial")? IMPERIAL - : PERSONALIZE; + : value == QStringLiteral("imperial")? IMPERIAL + : PERSONALIZE; if (v == prefs.unit_system) return; @@ -1910,6 +1910,17 @@ void LanguageSettingsObjectWrapper::setUseSystemLanguage(bool value) emit useSystemLanguageChanged(value); } +void LanguageSettingsObjectWrapper::setLangLocale(const QString &value) +{ + if (value == prefs.locale.lang_locale) + return; + QSettings s; + s.beginGroup(group); + s.setValue("UiLangLocale", value); + prefs.locale.lang_locale = copy_string(qPrintable(value)); + // no need to emit languageChanged since we already do this for setLanguage +} + void LanguageSettingsObjectWrapper::setLanguage(const QString& value) { if (value == prefs.locale.language) |