[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:20:37 CEST 2012
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Tue Jun 5 10:44:52 2012 +0200| [50962d72c11ff3a7c382e4d9314ef3dcba6e5eec] | committer: Felix Paul Kühne
macosx: don't manipulate the existing selection when right-clicking on the playlist table (close #6892)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=50962d72c11ff3a7c382e4d9314ef3dcba6e5eec
---
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 3535b82..15e4034 100644
--- a/modules/gui/macosx/playlist.m
+++ b/modules/gui/macosx/playlist.m
@@ -1378,8 +1378,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]];
}
@@ -1396,10 +1395,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