Commit ccd2c798 authored by Ilkka Ollakka's avatar 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
parent cb9ee688
...@@ -130,8 +130,7 @@ void StandardPLPanel::gotoPlayingItem() ...@@ -130,8 +130,7 @@ void StandardPLPanel::gotoPlayingItem()
void StandardPLPanel::handleExpansion( const QModelIndex& index ) void StandardPLPanel::handleExpansion( const QModelIndex& index )
{ {
assert( treeView ); currentView->scrollTo( index );
treeView->scrollTo( index );
} }
/* PopupAdd Menu for the Add Menu */ /* PopupAdd Menu for the Add Menu */
...@@ -319,8 +318,6 @@ void StandardPLPanel::createTreeView() ...@@ -319,8 +318,6 @@ void StandardPLPanel::createTreeView()
this, popupSelectColumn( QPoint ) ); this, popupSelectColumn( QPoint ) );
CONNECT( treeView, customContextMenuRequested( const QPoint & ), CONNECT( treeView, customContextMenuRequested( const QPoint & ),
this, popupPlView( const QPoint & ) ); this, popupPlView( const QPoint & ) );
CONNECT( model, currentChanged( const QModelIndex& ),
this, handleExpansion( const QModelIndex& ) );
/* SignalMapper for columns */ /* SignalMapper for columns */
selectColumnsSigMapper = new QSignalMapper( this ); selectColumnsSigMapper = new QSignalMapper( this );
...@@ -351,6 +348,8 @@ void StandardPLPanel::toggleView() ...@@ -351,6 +348,8 @@ void StandardPLPanel::toggleView()
treeView->show(); treeView->show();
currentView = treeView; currentView = treeView;
} }
CONNECT( model, currentChanged( const QModelIndex& ),
this, handleExpansion( const QModelIndex& ) );
} }
void StandardPLPanel::wheelEvent( QWheelEvent *e ) void StandardPLPanel::wheelEvent( QWheelEvent *e )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment