mirror of
https://github.com/clangen/musikcube.git
synced 2024-10-02 04:52:32 +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()) {
|
||||
this->selectedLocale = locale;
|
||||
this->localeData = nlohmann::json({});
|
||||
|
||||
std::string localeFn = this->localePath + "/" + locale + ".json";
|
||||
this->localeData = loadLocaleData(localeFn);
|
||||
|
||||
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);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user