Revision: 13525
          http://sourceforge.net/p/skim-app/code/13525
Author:   hofman
Date:     2023-07-02 21:41:28 +0000 (Sun, 02 Jul 2023)
Log Message:
-----------
highlight view itself when it is the only one selected

Modified Paths:
--------------
    trunk/SKThumbnailView.m

Modified: trunk/SKThumbnailView.m
===================================================================
--- trunk/SKThumbnailView.m     2023-07-02 16:38:38 UTC (rev 13524)
+++ trunk/SKThumbnailView.m     2023-07-02 21:41:28 UTC (rev 13525)
@@ -509,7 +509,7 @@
 - (void)applyMenuHighlighted:(BOOL)flag {
     NSCollectionView *collectionView = [[self controller] collectionView];
     NSIndexSet *selectionIndexes = [collectionView selectionIndexes];
-    if ([selectionIndexes containsIndex:[[[self thumbnail] page] pageIndex]]) {
+    if ([selectionIndexes count] > 1 && [selectionIndexes 
containsIndex:[[[self thumbnail] page] pageIndex]]) {
         [selectionIndexes enumerateIndexesUsingBlock:^(NSUInteger i, BOOL 
*stop){
             NSCollectionViewItem *item = (RUNNING_BEFORE(10_11)) ? 
[collectionView itemAtIndex:i] : [collectionView itemAtIndexPath:[NSIndexPath 
indexPathForItem:i inSection:0]];
             [(SKThumbnailView *)[item view] setMenuHighlighted:flag];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to