mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 20:13:36 +00:00
When the user saves the locale, save it to the prefs. Oops.
This commit is contained in:
parent
cfbd8baa3a
commit
683c0a345b
@ -120,13 +120,16 @@ bool Locale::SetSelectedLocale(const std::string& locale) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (it != this->locales.end()) {
|
if (it != this->locales.end()) {
|
||||||
this->selectedLocale = locale;
|
|
||||||
this->localeData = nlohmann::json({});
|
|
||||||
|
|
||||||
std::string localeFn = this->localePath + "/" + locale + ".json";
|
std::string localeFn = this->localePath + "/" + locale + ".json";
|
||||||
this->localeData = loadLocaleData(localeFn);
|
this->localeData = loadLocaleData(localeFn);
|
||||||
|
|
||||||
if (!this->localeData.is_null()) {
|
if (!this->localeData.is_null()) {
|
||||||
|
this->selectedLocale = locale;
|
||||||
|
this->localeData = nlohmann::json({});
|
||||||
|
|
||||||
|
prefs->SetString(keys::Locale, this->selectedLocale.c_str());
|
||||||
|
prefs->Save();
|
||||||
|
|
||||||
this->LocaleChanged(this->selectedLocale);
|
this->LocaleChanged(this->selectedLocale);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user