mirror of https://code.videolan.org/videolan/vlc
macosx: Select artists view when clicking on music sidebar entry, making music sidebar entry unselectable
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
This commit is contained in:
parent
3ba89ea810
commit
57e236ad53
|
@ -100,6 +100,15 @@ static NSString * const VLCLibrarySegmentCellIdentifier = @"VLCLibrarySegmentCel
|
||||||
return cellView;
|
return cellView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSIndexSet *)outlineView:(NSOutlineView *)outlineView selectionIndexesForProposedSelection:(nonnull NSIndexSet *)proposedSelectionIndexes
|
||||||
|
{
|
||||||
|
if (proposedSelectionIndexes.count == 0 || proposedSelectionIndexes.firstIndex != VLCLibraryMusicSegment) {
|
||||||
|
return proposedSelectionIndexes;
|
||||||
|
} else {
|
||||||
|
return [NSIndexSet indexSetWithIndex:VLCLibraryArtistsMusicSubSegment];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)outlineViewSelectionDidChange:(NSNotification *)notification
|
- (void)outlineViewSelectionDidChange:(NSNotification *)notification
|
||||||
{
|
{
|
||||||
NSTreeNode * const node = (NSTreeNode *)[_outlineView itemAtRow:_outlineView.selectedRow];
|
NSTreeNode * const node = (NSTreeNode *)[_outlineView itemAtRow:_outlineView.selectedRow];
|
||||||
|
|
Loading…
Reference in New Issue