Revision: 27743
          http://sourceforge.net/p/bibdesk/svn/27743
Author:   hofman
Date:     2022-07-19 09:17:09 +0000 (Tue, 19 Jul 2022)
Log Message:
-----------
select icon for popup menu from accessibility

Modified Paths:
--------------
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2022-07-18 
19:13:05 UTC (rev 27742)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2022-07-19 
09:17:09 UTC (rev 27743)
@@ -4779,12 +4779,14 @@
 }
 
 - (void)showMenuForIconElement:(FVAccessibilityIconElement *)element {
-    if ([element index] < [_orderedURLs count]) {
+    NSUInteger idx = [element index];
+    if (idx < [_orderedURLs count]) {
         NSUInteger r, c;
-        [self _getGridRow:&r column:&c ofIndex:[element index]];
+        [self _getGridRow:&r column:&c ofIndex:idx];
         NSRect rect = [self _rectOfIconInRow:r column:c];
         NSPoint p = NSMakePoint(NSMidX(rect), fmin(NSMidY(rect), NSMinY(rect) 
+ 10.0));
-        [[self menuForIconAtIndex:[element index]] 
popUpMenuPositioningItem:nil atLocation:p inView:self];
+        [self setSelectionIndexes:[NSIndexSet indexSetWithIndex:idx]];
+        [[self menuForIconAtIndex:idx] popUpMenuPositioningItem:nil 
atLocation:p inView:self];
     }
 }
 

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



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to