]> git.sesse.net Git - vlc/commitdiff
skins2: playlist (simplify)
authorErwan Tulou <erwan10@videolan.org>
Thu, 5 Aug 2010 14:17:29 +0000 (16:17 +0200)
committerErwan Tulou <erwan10@videolan.org>
Thu, 5 Aug 2010 14:33:40 +0000 (16:33 +0200)
getNextSibling was buggy (previous patch), and the only use doesn't seem right.

modules/gui/skins2/vars/playtree.cpp

index 2407e385cf3be21e502931f94768bd0a2b33ddd4..05cb89fb7a5166347ccc436b95d66e30540d4fb2 100644 (file)
@@ -73,18 +73,15 @@ void Playtree::delSelected()
             {
                 playlist_DeleteFromInput( getIntf()->p_sys->p_playlist,
                                           p_item->p_input, pl_Locked );
-                it2 = getNextVisibleItem( it ) ;
-                it->parent()->removeChild( it );
-                it = it2;
             }
             else
             {
                 playlist_NodeDelete( getIntf()->p_sys->p_playlist, p_item,
                                      true, false );
-                it2 = getNextSibling( it );
-                it->parent()->removeChild( it );
-                it = it2;
             }
+            it2 = getNextVisibleItem( it ) ;
+            it->parent()->removeChild( it );
+            it = it2;
         }
         else
         {