Skip to content

Commit

Permalink
- Handle auto detection of language. Use QLocale::system().name() to …
Browse files Browse the repository at this point in the history
…find the default language.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@19566 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Mar 13, 2014
1 parent e2d0700 commit 90708f7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion OMEdit/OMEditGUI/GUI/Dialogs/OptionsDialog.cpp
Expand Up @@ -349,7 +349,12 @@ void OptionsDialog::readCurveStyleSettings()
void OptionsDialog::saveGeneralSettings()
{
// save Language option
mSettings.setValue("language", mpGeneralSettingsPage->getLanguageComboBox()->itemData(mpGeneralSettingsPage->getLanguageComboBox()->currentIndex()).toLocale().name());
QString language;
if (mpGeneralSettingsPage->getLanguageComboBox()->currentIndex() == 0)
language = QLocale::system().name();
else
language = mpGeneralSettingsPage->getLanguageComboBox()->itemData(mpGeneralSettingsPage->getLanguageComboBox()->currentIndex()).toLocale().name();
mSettings.setValue("language", language);
// save working directory
mpMainWindow->getOMCProxy()->changeDirectory(mpGeneralSettingsPage->getWorkingDirectory());
mSettings.setValue("workingDirectory", mpMainWindow->getOMCProxy()->changeDirectory());
Expand Down

0 comments on commit 90708f7

Please sign in to comment.