]> git.sesse.net Git - vlc/commitdiff
skins2: playlist (cosmetic)
authorErwan Tulou <erwan10@videolan.org>
Thu, 5 Aug 2010 16:34:18 +0000 (18:34 +0200)
committerErwan Tulou <erwan10@videolan.org>
Tue, 10 Aug 2010 09:30:50 +0000 (11:30 +0200)
modules/gui/skins2/controls/ctrl_tree.cpp

index b8be9b453f9cf4f8f7cb7b31d7e42392265cc0b4..4c1fff0e82a26de3dde87690e694c0e18fd8e317 100644 (file)
@@ -726,20 +726,19 @@ void CtrlTree::autoScroll()
            break;
         }
     }
+
     for( it = m_flat ? m_rTree.firstLeaf() : m_rTree.begin();
          it != m_rTree.end();
          it = m_flat ? m_rTree.getNextLeaf( it )
                      : m_rTree.getNextVisibleItem( it ) )
     {
         if( it->m_playing )
+        {
+           ensureVisible( playIndex );
            break;
+        }
         playIndex++;
     }
-
-    if( it == m_rTree.end() ) return;
-
-
-    ensureVisible( playIndex );
 }