[vlc-commits] [Git][videolan/vlc][master] macosx: fix context menu actions for selected grid items
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Wed Nov 11 19:55:57 UTC 2026
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
3f8a182a by Serhii Bykov at 2026-11-11T20:36:30+01:00
macosx: fix context menu actions for selected grid items
- - - - -
1 changed file:
- modules/gui/macosx/library/VLCLibraryCollectionViewItem.m
Changes:
=====================================
modules/gui/macosx/library/VLCLibraryCollectionViewItem.m
=====================================
@@ -229,13 +229,9 @@ NSString *VLCLibraryCollectionViewItemIdentifier = @"VLCLibraryCollectionViewIte
NSArray<VLCLibraryRepresentedItem *> * const selectedItems =
[libraryDataSource representedItemsAtIndexPaths:indexPaths
forCollectionView:collectionView];
- const NSInteger representedItemIndex = [selectedItems indexOfObjectPassingTest:^BOOL(
- VLCLibraryRepresentedItem * const repItem, const NSUInteger __unused idx, BOOL * const __unused stop
- ) {
- return [repItem isEqual:self.representedItem];
- }];
+ NSIndexPath * const clickedIndexPath = [collectionView indexPathForItem:self];
NSArray<VLCLibraryRepresentedItem *> *items = nil;
- if (representedItemIndex == NSNotFound) {
+ if (clickedIndexPath == nil || ![indexPaths containsObject:clickedIndexPath]) {
items = @[self.representedItem];
} else {
items = selectedItems;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3f8a182a18f61856f811e81845eec2f78cf364f0
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3f8a182a18f61856f811e81845eec2f78cf364f0
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list