Revision: 13219
          http://sourceforge.net/p/skim-app/code/13219
Author:   hofman
Date:     2023-01-12 15:08:26 +0000 (Thu, 12 Jan 2023)
Log Message:
-----------
don't observe and register widgets before starting registering, they will be 
registered when the widgets array is set up

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

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2023-01-12 14:28:45 UTC (rev 13218)
+++ trunk/SKMainWindowController.m      2023-01-12 15:08:26 UTC (rev 13219)
@@ -986,13 +986,7 @@
 
 - (void)document:(PDFDocument *)pdfDocument didFindWidgetsOnPage:(PDFPage 
*)page {
     NSArray *array = [page widgets];
-    if ([array count]) {
-        if ([widgets containsObject:[array firstObject]])
-            return;
-        if (widgets == nil)
-            widgets = [[NSMutableArray alloc] init];
-        if (widgetValues == nil)
-            widgetValues = [[NSMapTable strongToStrongObjectsMapTable] retain];
+    if ([array count] && widgets && [widgets containsObject:[array 
firstObject]] == NO) {
         [widgets addObjectsFromArray:array];
         [self startObservingNotes:array];
         for (PDFAnnotation *annotation in array) {

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