[vlc-commits] [Git][videolan/vlc][master] macosx: Restore expand state of nodes in navigation sidebar view controller...
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Thu Feb 13 05:47:40 UTC 2025
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
b4c8a4ca by Claudio Cambra at 2025-02-12T22:27:10+00:00
macosx: Restore expand state of nodes in navigation sidebar view controller after internal nodes change
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
=====================================
@@ -124,6 +124,14 @@ static NSString * const VLCLibrarySegmentCellIdentifier = @"VLCLibrarySegmentCel
{
const VLCLibrarySegmentType currentSegmentType = self.libraryWindow.librarySegmentType;
+ NSMutableSet<NSNumber *> * const expandedSegmentTypes = NSMutableSet.set;
+ for (VLCLibrarySegment * const segment in self.treeController.content) {
+ NSTreeNode * const node = [self nodeForSegmentType:segment.segmentType];
+ if ([self.outlineView isItemExpanded:node]) {
+ [expandedSegmentTypes addObject:@(segment.segmentType)];
+ }
+ }
+
self.ignoreSegmentSelectionChanges = YES;
_segments = VLCLibrarySegment.librarySegments;
@@ -143,6 +151,13 @@ static NSString * const VLCLibrarySegmentCellIdentifier = @"VLCLibrarySegmentCel
self.ignoreSegmentSelectionChanges = NO;
[self updateBookmarkObservation];
+
+ for (VLCLibrarySegment * const segment in self.treeController.content) {
+ if ([expandedSegmentTypes containsObject:@(segment.segmentType)]) {
+ NSTreeNode * const node = [self nodeForSegmentType:segment.segmentType];
+ [self.outlineView expandItem:node];
+ }
+ }
}
- (void)updateBookmarkObservation
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b4c8a4cafa8982ab8e596e393afb010b23de8ed8
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b4c8a4cafa8982ab8e596e393afb010b23de8ed8
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