Skip to content

Commit

Permalink
fix overriding of locale in options
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed May 17, 2012
1 parent be13365 commit b2dbfc8
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/app/qgsoptions.cpp
Expand Up @@ -417,15 +417,12 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
foreach( QString l, myI18nList )
{
#if QT_VERSION >= 0x040800
cboLocale->addItem( QIcon( QString( ":/images/flags/%1.png" ).arg( l ) ), QLocale( l ).nativeLanguageName() );
cboLocale->addItem( QIcon( QString( ":/images/flags/%1.png" ).arg( l ) ), QLocale( l ).nativeLanguageName(), l );
#else
cboLocale->addItem( QIcon( QString( ":/images/flags/%1.png" ).arg( l ) ), l );
cboLocale->addItem( QIcon( QString( ":/images/flags/%1.png" ).arg( l ) ), l, l );
#endif
}
if ( myI18nList.contains( myUserLocale ) )
{
cboLocale->setCurrentIndex( myI18nList.indexOf( myUserLocale ) );
}
cboLocale->setCurrentIndex( cboLocale->findData( myUserLocale ) );
bool myLocaleOverrideFlag = settings.value( "locale/overrideFlag", false ).toBool();
grpLocale->setChecked( myLocaleOverrideFlag );

Expand Down Expand Up @@ -909,7 +906,7 @@ void QgsOptions::saveOptions()
//
// Locale settings
//
settings.setValue( "locale/userLocale", cboLocale->currentText() );
settings.setValue( "locale/userLocale", cboLocale->itemData( cboLocale->currentIndex() ).toString() );
settings.setValue( "locale/overrideFlag", grpLocale->isChecked() );


Expand Down

0 comments on commit b2dbfc8

Please sign in to comment.