From: Ilkka Ollakka Date: Tue, 26 Jan 2010 20:50:55 +0000 (+0200) Subject: QT4: connect currentChanged from model on iconView case also X-Git-Tag: 1.1.0-ff~848 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=ccd2c798d569ff6f3c16c2184af147e7b1d70828;p=vlc QT4: connect currentChanged from model on iconView case also Should fix issue on not scrolling to current item when it changes in iconView --- diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp index 14ee07f24f..840ce2f433 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 )