We need to call LoadTranslation when langChanged or systemChanged

--HG--
branch : feature
This commit is contained in:
Valentina Zhuravska 2016-01-11 14:28:26 +02:00
parent c7696c9d2a
commit 3caee4a8df

View File

@ -114,18 +114,17 @@ void ConfigurationPage::Apply()
settings->SetConfirmItemDelete(askPointDeletionCheck->isChecked()); settings->SetConfirmItemDelete(askPointDeletionCheck->isChecked());
settings->SetToolBarStyle(toolBarStyleCheck->isChecked()); settings->SetToolBarStyle(toolBarStyleCheck->isChecked());
if (langChanged) if (langChanged || systemChanged)
{ {
const QString locale = qvariant_cast<QString>(langCombo->itemData(langCombo->currentIndex())); const QString locale = qvariant_cast<QString>(langCombo->itemData(langCombo->currentIndex()));
settings->SetLocale(locale); settings->SetLocale(locale);
langChanged = false; langChanged = false;
qApp->LoadTranslation(locale);
}
if (systemChanged)
{
const QString code = qvariant_cast<QString>(systemCombo->itemData(systemCombo->currentIndex())); const QString code = qvariant_cast<QString>(systemCombo->itemData(systemCombo->currentIndex()));
settings->SetPMSystemCode(code); settings->SetPMSystemCode(code);
systemChanged = false; systemChanged = false;
qApp->LoadTranslation(locale);
} }
if (this->unitChanged) if (this->unitChanged)
{ {