Revision: 15391
          http://sourceforge.net/p/skim-app/code/15391
Author:   hofman
Date:     2025-06-06 21:33:50 +0000 (Fri, 06 Jun 2025)
Log Message:
-----------
check for widgets first

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

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2025-06-06 14:38:22 UTC (rev 15390)
+++ trunk/SKMainWindowController.m      2025-06-06 21:33:50 UTC (rev 15391)
@@ -1036,16 +1036,16 @@
     
     [self addAnnotationsFromDictionaries:noteDicts toDocument:pdfDoc 
pageIndexes:pageIndexes autoUpdate:isConvert];
     
-    if (isConvert) {
+    if (isConvert == NO) {
+        NSArray *widgetProperties = [noteDicts 
filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"type = 
\"Widget\""]];
+        if ([widgetProperties count])
+            [self changeWidgetsFromDictionaries:widgetProperties];
+    } else if ([widgets count]) {
         NSMapTable *values = [NSMapTable strongToStrongObjectsMapTable];
         for (PDFAnnotation *widget in widgets)
             [values setObject:[widget objectValue] forKey:widget];
         if ([values count])
             [self setWidgetValues:values];
-    } else {
-        NSArray *widgetProperties = [noteDicts 
filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"type = 
\"Widget\""]];
-        if ([widgetProperties count])
-            [self changeWidgetsFromDictionaries:widgetProperties];
     }
     
     // make sure we clear the undo handling

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