[vlc-commits] MacOS Gui: play right input when adding a new file due to double click in finder

David Fuhrmann git at videolan.org
Thu Nov 24 10:08:55 CET 2011


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Mon Nov 21 20:22:20 2011 +0100| [c46be236fa6b7d1f53751476264c2601e675a0f9] | committer: Felix Paul Kühne

MacOS Gui: play right input when adding a new file due to double click in finder

Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>

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

 modules/gui/macosx/playlist.m |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m
index 7d9acfe..5107431 100644
--- a/modules/gui/macosx/playlist.m
+++ b/modules/gui/macosx/playlist.m
@@ -1116,10 +1116,12 @@
         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



More information about the vlc-commits mailing list