]> git.sesse.net Git - vlc/commitdiff
MacOS Gui: play right input when adding a new file due to double click in finder
authorDavid Fuhrmann <david.fuhrmann@googlemail.com>
Mon, 21 Nov 2011 19:22:20 +0000 (20:22 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Thu, 24 Nov 2011 09:08:54 +0000 (10:08 +0100)
Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
modules/gui/macosx/playlist.m

index 7d9acfe17f878811528132b3159cc2764fced869..5107431a9cbd64e63103efdf9088b8d48d0cd707 100644 (file)
         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