]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/playlist.m
dash: MPDManager: Fixing memory leak
[vlc] / modules / gui / macosx / playlist.m
index bda26646674758ed128512b3b8dd7d41ceb31b5b..5107431a9cbd64e63103efdf9088b8d48d0cd707 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * playlist.m: MacOS X interface module
  *****************************************************************************
-* Copyright (C) 2002-2009 the VideoLAN team
+* Copyright (C) 2002-2009 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
         vlc_gc_decref( p_input );
     }
     PL_UNLOCK;
-    [o_outline_view selectRowIndexes:[NSIndexSet indexSetWithIndex:i_position] byExtendingSelection:YES];
-    [self playItem:nil];
+    if( i_position == -1 )
+        i_position = [o_outline_dict count] - 1;
 
     [self playlistUpdated];
+    [o_outline_view selectRowIndexes:[NSIndexSet indexSetWithIndex:i_position] byExtendingSelection:NO];
+    [self playItem:nil];
 }
 
 - (void)appendNodeArray:(NSArray*)o_array inNode:(playlist_item_t *)p_node atPos:(int)i_position enqueue:(BOOL)b_enqueue