Mercurial > hg > forks > UniversalIndentGUI
changeset 148:17cc34bba319
[fix] Bug ID 1728972: The crash on closing the application after the first run was caused by the language selection. After retrieving the system locale language the new language was not set in the settings.
git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@351 59b1889a-e5ac-428c-b0c7-476e01d41282
author | thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282> |
---|---|
date | Thu, 31 May 2007 14:57:33 +0000 |
parents | cf7aba239211 |
children | e89f0d0dc589 |
files | src/mainwindow.cpp |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/mainwindow.cpp Thu May 31 14:36:49 2007 +0000 +++ b/src/mainwindow.cpp Thu May 31 14:57:33 2007 +0000 @@ -252,10 +252,11 @@ languageShort.truncate(2); // If no translation file for the systems local language exist, fall back to English. - if ( settings->getAvailableTranslations().indexOf( languageShort ) < 0 ) { + if ( settings->getAvailableTranslations().indexOf(languageShort) < 0 ) { languageShort = "en"; - settings->setValueByName("Language", 0); } + // Set the language setting to the new language. + settings->setValueByName("Language", settings->getAvailableTranslations().indexOf(languageShort) ); } // If a language was defined in the settings, get this language mnemonic. else {