Revision: 15419
          http://sourceforge.net/p/skim-app/code/15419
Author:   hofman
Date:     2025-06-09 14:11:21 +0000 (Mon, 09 Jun 2025)
Log Message:
-----------
use local variable

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

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2025-06-09 09:20:49 UTC (rev 15418)
+++ trunk/SKMainWindowController.m      2025-06-09 14:11:21 UTC (rev 15419)
@@ -920,12 +920,13 @@
 }
 
 - (void)changeWidgetsFromDictionaries:(NSArray *)widgetDicts {
+    PDFDocument *pdfDoc = [pdfView document];
     for (NSDictionary *dict in widgetDicts) {
         NSRect bounds = NSIntegralRect(NSRectFromString([dict 
objectForKey:SKNPDFAnnotationBoundsKey]));
         NSUInteger pageIndex = [[dict 
objectForKey:SKNPDFAnnotationPageIndexKey] unsignedIntegerValue];
         SKNPDFWidgetType widgetType = [[dict 
objectForKey:SKNPDFAnnotationWidgetTypeKey] integerValue];
         NSString *fieldName = [dict objectForKey:SKNPDFAnnotationFieldNameKey] 
?: @"";
-        for (PDFAnnotation *annotation in [[[self pdfDocument] 
pageAtIndex:pageIndex] annotations]) {
+        for (PDFAnnotation *annotation in [[pdfDoc pageAtIndex:pageIndex] 
annotations]) {
             if ([annotation isWidget] &&
                 [annotation widgetType] == widgetType &&
                 [([annotation fieldName] ?: @"") isEqualToString:fieldName] &&

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



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to