From 952ca023c8cb4f03cbf391382eb073d06e5df309 Mon Sep 17 00:00:00 2001 From: Erwan Tulou Date: Thu, 5 Aug 2010 18:34:18 +0200 Subject: [PATCH] skins2: playlist (cosmetic) --- modules/gui/skins2/controls/ctrl_tree.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/gui/skins2/controls/ctrl_tree.cpp b/modules/gui/skins2/controls/ctrl_tree.cpp index b8be9b453f..4c1fff0e82 100644 --- a/modules/gui/skins2/controls/ctrl_tree.cpp +++ b/modules/gui/skins2/controls/ctrl_tree.cpp @@ -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 ); } -- 2.39.5