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 <[email protected]>

- - - - -


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
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to