[vlc-commits] Qt4: assume that items are appended to end, so start search from there

Ilkka Ollakka git at videolan.org
Sun Jan 22 17:59:31 CET 2012


vlc/vlc-1.2 | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Jan 22 01:36:04 2012 +0200| [f242a72f919d1616af094d1d45dee8472f4deba4] | committer: Jean-Baptiste Kempf

Qt4: assume that items are appended to end, so start search from there
(cherry picked from commit 7dfc1b4a65177736e358a2e671b760c81703595f)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=f242a72f919d1616af094d1d45dee8472f4deba4
---

 .../gui/qt4/components/playlist/playlist_model.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index 2ee821e..1debc1d 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -641,7 +641,7 @@ void PLModel::processItemAppend( int i_item, int i_parent )
         PL_UNLOCK; return;
     }
 
-    for( pos = 0; pos < p_item->p_parent->i_children; pos++ )
+    for( pos = p_item->p_parent->i_children - 1; pos >= 0; pos-- )
         if( p_item->p_parent->pp_children[pos] == p_item ) break;
 
     newItem = new PLItem( p_item, nodeParentItem );



More information about the vlc-commits mailing list