X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fmacosx%2Fplaylist.m;h=3a265f14bed7f449f1edcbe468a2282e525db62e;hb=df1391498a5513cc50de9bc6d7895932e1454696;hp=70eaaa806a77d31634967ba472890d9c0c7457ee;hpb=7cf99d81d8213730b7919f626d162f94b7153127;p=vlc diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m index 70eaaa806a..3a265f14be 100644 --- a/modules/gui/macosx/playlist.m +++ b/modules/gui/macosx/playlist.m @@ -115,6 +115,7 @@ [o_outline_view setTarget: self]; [o_outline_view setDelegate: self]; [o_outline_view setDataSource: self]; + [o_outline_view setAllowsEmptySelection: NO]; vlc_object_release( p_playlist ); [self initStrings]; @@ -1201,8 +1202,11 @@ pt = [o_outline_view convertPoint: [o_event locationInWindow] fromView: nil]; - b_item_sel = ( [o_outline_view rowAtPoint: pt] != -1 && - [o_outline_view selectedRow] != -1 ); + NSInteger row = [o_outline_view rowAtPoint:pt]; + if( row != -1 ) + [o_outline_view selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO]; + + b_item_sel = ( row != -1 && [o_outline_view selectedRow] != -1 ); b_rows = [o_outline_view numberOfRows] != 0; [o_mi_play setEnabled: b_item_sel];