[vlc-commits] Qt4: no need to set selected view by hand all the time

Ilkka Ollakka git at videolan.org
Mon Apr 16 14:36:45 CEST 2012


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Mon Apr 16 15:33:49 2012 +0300| [764ff17a57146c7b08178b279fdfd61508c00d9e] | committer: Ilkka Ollakka

Qt4: no need to set selected view by hand all the time

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

 modules/gui/qt4/components/playlist/playlist.cpp |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/playlist.cpp b/modules/gui/qt4/components/playlist/playlist.cpp
index 7d04d12..e6ba9e6 100644
--- a/modules/gui/qt4/components/playlist/playlist.cpp
+++ b/modules/gui/qt4/components/playlist/playlist.cpp
@@ -136,7 +136,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
         viewSelectionMapper->setMapping( viewActions[i], i );
         CONNECT( viewActions[i], triggered(), viewSelectionMapper, map() );
     }
-    viewActions[0]->setChecked( true );
+    viewActions[mainView->currentViewIndex()]->setChecked( true );
 
     QMenu *viewMenu = new QMenu( viewButton );
     viewMenu->addActions( actionGroup->actions() );
@@ -249,8 +249,6 @@ void PlaylistWidget::changeView( const QModelIndex& index )
 {
     searchEdit->clear();
     locationBar->setIndex( index );
-    int i = mainView->currentViewIndex();
-    viewActions[i]->setChecked(true);
 }
 
 void PlaylistWidget::clearPlaylist()



More information about the vlc-commits mailing list