[vlc-commits] Qt: simple_preferences: fix default item for style combo

Francois Cartegnie git at videolan.org
Fri Sep 9 08:11:40 CEST 2011


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Sep  9 08:01:27 2011 +0200| [9c833b7dd61110398f6bdef4afa99209433db7cf] | committer: Francois Cartegnie

Qt: simple_preferences: fix default item for style combo

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9c833b7dd61110398f6bdef4afa99209433db7cf
---

 modules/gui/qt4/components/simple_preferences.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp
index 202c3bf..dfe1376 100644
--- a/modules/gui/qt4/components/simple_preferences.cpp
+++ b/modules/gui/qt4/components/simple_preferences.cpp
@@ -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 );



More information about the vlc-commits mailing list