Revision: 16380
          http://sourceforge.net/p/skim-app/code/16380
Author:   hofman
Date:     2026-06-09 15:27:34 +0000 (Tue, 09 Jun 2026)
Log Message:
-----------
ignore add/remove annotation when page is not displayed

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2026-06-09 15:24:17 UTC (rev 16379)
+++ trunk/SKPDFView.m   2026-06-09 15:27:34 UTC (rev 16380)
@@ -3092,11 +3092,16 @@
 #pragma mark Notification handling
 
 - (void)handleDidAddRemoveAnnotationNotification:(NSNotification 
*)notification {
-    PDFAnnotation *annotation = [[notification userInfo] 
objectForKey:SKPDFDocumentAnnotationKey];
+    NSDictionary *userInfo = [notification userInfo];
+    PDFPage *page = [userInfo objectForKey:SKPDFDocumentPageKey];
     
-    [loupeController updateContents];
-    if ([annotation isNote])
-        [self resetPDFToolTipRects];
+    if ([self isPageAtIndexDisplayed:[page pageIndex]]) {
+        PDFAnnotation *annotation = [userInfo 
objectForKey:SKPDFDocumentAnnotationKey];
+        
+        [loupeController updateContents];
+        if ([annotation isNote])
+            [self resetPDFToolTipRects];
+    }
 }
 
 - (void)handleWillRemoveAnnotationNotification:(NSNotification *)notification {

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