]> git.sesse.net Git - vlc/commitdiff
macosx: don't manipulate the existing selection when right-clicking on the playlist...
authorFelix Paul Kühne <fkuehne@videolan.org>
Tue, 5 Jun 2012 08:44:52 +0000 (10:44 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Tue, 5 Jun 2012 09:20:35 +0000 (11:20 +0200)
modules/gui/macosx/playlist.m

index 3535b82a63ba2976db836be84ab5b76fa8182e2b..15e40348b0a2c84bda552e9ffcb3501f781367b3 100644 (file)
     id o_item = [o_outline_view itemAtRow: [o_outline_view selectedRow]];
     playlist_item_t *p_item = (playlist_item_t *)[o_item pointerValue];
 
-    if( ![[o_outline_view dataSource] outlineView: o_outline_view
-                                                    isItemExpandable: o_item] )
+    if( ![[o_outline_view dataSource] outlineView: o_outline_view isItemExpandable: o_item] )
     {
         o_item = [o_outline_dict objectForKey: [NSString stringWithFormat: @"%p", p_item->p_parent]];
     }
     bool b_rows;
     bool b_item_sel;
 
-    pt = [o_outline_view convertPoint: [o_event locationInWindow]
-                                                 fromView: nil];
+    pt = [o_outline_view convertPoint: [o_event locationInWindow] fromView: nil];
     int row = [o_outline_view rowAtPoint:pt];
-    if( row != -1 )
+    if( row != -1 && [o_outline_view selectedRow] == -1)
         [o_outline_view selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
 
     b_item_sel = ( row != -1 && [o_outline_view selectedRow] != -1 );