]> git.sesse.net Git - vlc/commitdiff
Qt: simple_preferences: fix default item for style combo
authorFrancois Cartegnie <fcvlcdev@free.fr>
Fri, 9 Sep 2011 06:01:27 +0000 (08:01 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Fri, 9 Sep 2011 06:12:31 +0000 (08:12 +0200)
modules/gui/qt4/components/simple_preferences.cpp

index 202c3bf2c18cd4f4ea7c31e79f278e4a4e34b5c1..dfe137687cd22ebe1ddd03993e07377edac46894 100644 (file)
@@ -547,6 +547,8 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
             ui.stylesCombo->setCurrentIndex( ui.stylesCombo->findText(
                         getSettings()->value( "MainWindow/QtStyle", "" ).toString() ) );
             ui.stylesCombo->insertSeparator( 1 );
+            if ( ui.stylesCombo->currentIndex() < 0 )
+                ui.stylesCombo->setCurrentIndex( 0 ); /* default */
 
             CONNECT( ui.stylesCombo, currentIndexChanged( QString ), this, changeStyle( QString ) );
             optionWidgets.append( ui.stylesCombo );