]> git.sesse.net Git - vlc/commitdiff
Qt4: don't call browseInto if not needed when item changes
authorIlkka Ollakka <ileoo@videolan.org>
Sun, 20 Jun 2010 10:20:07 +0000 (13:20 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Sun, 20 Jun 2010 10:33:46 +0000 (13:33 +0300)
modules/gui/qt4/components/playlist/standardpanel.cpp

index 37be40edfac54e2e898a7f8b777942dc61ff7645..dc0db6a5c75ff7e23244baef6a6863a4ea6e1509 100644 (file)
@@ -159,7 +159,8 @@ void StandardPLPanel::gotoPlayingItem()
 void StandardPLPanel::handleExpansion( const QModelIndex& index )
 {
     assert( currentView );
-    browseInto( index.parent() );
+    if( currentRootIndexId != -1 && currentRootIndexId != model->itemId( index.parent() ) )
+        browseInto( index.parent() );
     currentView->scrollTo( index );
 }