[vlc-commits] macosx: don' t manipulate the existing selection when right-clicking on the playlist table (close #6892)

Felix Paul Kühne git at videolan.org
Tue Jun 5 11:24:16 CEST 2012


vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Tue Jun  5 10:44:52 2012 +0200| [e2769a9bf1807b18d2ce30c3aec9722a81b946da] | committer: Felix Paul Kühne

macosx: don't manipulate the existing selection when right-clicking on the playlist table (close #6892)
(cherry picked from commit 50962d72c11ff3a7c382e4d9314ef3dcba6e5eec)

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

 modules/gui/macosx/playlist.m |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m
index e0f382e..30f9302 100644
--- a/modules/gui/macosx/playlist.m
+++ b/modules/gui/macosx/playlist.m
@@ -1270,8 +1270,7 @@
     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]];
     }
@@ -1288,10 +1287,9 @@
     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 );



More information about the vlc-commits mailing list