[vlc-devel] commit: QT4: connect currentChanged from model on iconView case also ( Ilkka Ollakka )

git version control git at videolan.org
Tue Jan 26 21:52:02 CET 2010


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Tue Jan 26 22:50:55 2010 +0200| [ccd2c798d569ff6f3c16c2184af147e7b1d70828] | committer: Ilkka Ollakka 

QT4: connect currentChanged from model on iconView case also

Should fix issue on not scrolling to current item when it changes in iconView

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

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

diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
index 14ee07f..840ce2f 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
@@ -130,8 +130,7 @@ void StandardPLPanel::gotoPlayingItem()
 
 void StandardPLPanel::handleExpansion( const QModelIndex& index )
 {
-    assert( treeView );
-    treeView->scrollTo( index );
+    currentView->scrollTo( index );
 }
 
 /* PopupAdd Menu for the Add Menu */
@@ -319,8 +318,6 @@ void StandardPLPanel::createTreeView()
              this, popupSelectColumn( QPoint ) );
     CONNECT( treeView, customContextMenuRequested( const QPoint & ),
              this, popupPlView( const QPoint & ) );
-    CONNECT( model, currentChanged( const QModelIndex& ),
-             this, handleExpansion( const QModelIndex& ) );
 
     /* SignalMapper for columns */
     selectColumnsSigMapper = new QSignalMapper( this );
@@ -351,6 +348,8 @@ void StandardPLPanel::toggleView()
         treeView->show();
         currentView = treeView;
     }
+    CONNECT( model, currentChanged( const QModelIndex& ),
+             this, handleExpansion( const QModelIndex& ) );
 }
 
 void StandardPLPanel::wheelEvent( QWheelEvent *e )




More information about the vlc-devel mailing list