[vlc-commits] [Git][videolan/vlc][master] macosx: Fix music library segment selection not doing anything while in playlists segment
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Thu Jan 29 06:39:55 UTC 2026
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
d6923002 by Claudio Cambra at 2026-01-29T07:11:03+01:00
macosx: Fix music library segment selection not doing anything while in playlists segment
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
1 changed file:
- modules/gui/macosx/library/VLCLibraryWindowNavigationSidebarViewController.m
Changes:
=====================================
modules/gui/macosx/library/VLCLibraryWindowNavigationSidebarViewController.m
=====================================
@@ -357,11 +357,6 @@ static NSString * const VLCLibrarySegmentCellIdentifier = @"VLCLibrarySegmentCel
if (segment.segmentType == VLCLibraryHeaderSegmentType) {
return NSIndexSet.indexSet;
- } else if (segment.segmentType == VLCLibraryMusicSegmentType) {
- [self.outlineView expandItem:[self nodeForSegmentType:VLCLibraryMusicSegmentType]];
- NSTreeNode * const artistsNode = [self nodeForSegmentType:VLCLibraryArtistsMusicSubSegmentType];
- const NSInteger artistsIndex = [self.outlineView rowForItem:artistsNode];
- return [NSIndexSet indexSetWithIndex:artistsIndex];
}
}
@@ -380,7 +375,14 @@ static NSString * const VLCLibrarySegmentCellIdentifier = @"VLCLibrarySegmentCel
NSObject * const representedObject = segment.representedObject;
NSParameterAssert(representedObject != nil);
- if ([representedObject isKindOfClass:NSNumber.class]) {
+ if (segment.segmentType == VLCLibraryMusicSegmentType) {
+ [self.outlineView expandItem:[self nodeForSegmentType:VLCLibraryMusicSegmentType]];
+ NSTreeNode * const artistsNode = [self nodeForSegmentType:VLCLibraryArtistsMusicSubSegmentType];
+ const NSInteger artistsIndex = [self.outlineView rowForItem:artistsNode];
+ [self.outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:artistsIndex]
+ byExtendingSelection:NO];
+ return;
+ } else if ([representedObject isKindOfClass:NSNumber.class]) {
self.libraryWindow.librarySegmentType = segment.segmentType;
} else if ([representedObject isKindOfClass:VLCLibrarySegmentBookmarkedLocation.class]) {
VLCLibrarySegmentBookmarkedLocation * const bookmarkedLocation =
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/d6923002d502983b89399598fecd49572473aa2f
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/d6923002d502983b89399598fecd49572473aa2f
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list