Revision: 14603
          http://sourceforge.net/p/skim-app/code/14603
Author:   hofman
Date:     2024-10-29 16:27:47 +0000 (Tue, 29 Oct 2024)
Log Message:
-----------
Only remove popup annotation when it was added to a page

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

Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m      2024-10-29 16:27:36 UTC (rev 14602)
+++ trunk/SKMainDocument.m      2024-10-29 16:27:47 UTC (rev 14603)
@@ -1152,7 +1152,7 @@
                 for (PDFAnnotation *annotation in [[page annotations] copy]) {
                     if ([annotation isSkimNote] == NO && [annotation 
isConvertibleAnnotation]) {
                         PDFAnnotation *popup = [annotation popup];
-                        if (popup)
+                        if ([popup page])
                             [page removeAnnotation:popup];
                         [page removeAnnotation:annotation];
                     }

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2024-10-29 16:27:36 UTC (rev 14602)
+++ trunk/SKMainWindowController.m      2024-10-29 16:27:47 UTC (rev 14603)
@@ -996,7 +996,7 @@
         for (PDFAnnotation *annotation in [notesToRemove copy]) {
             [pageIndexes addIndex:[annotation pageIndex]];
             PDFAnnotation *popup = [annotation popup];
-            if (popup)
+            if ([popup page])
                 [pdfDoc removeAnnotation:popup];
             [pdfDoc removeAnnotation:annotation];
         }

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