Revision: 14797
          http://sourceforge.net/p/skim-app/code/14797
Author:   hofman
Date:     2024-12-09 09:45:57 +0000 (Mon, 09 Dec 2024)
Log Message:
-----------
there should be no need for calling annotationChangedObPage:

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

Modified: trunk/PDFView_SKExtensions.m
===================================================================
--- trunk/PDFView_SKExtensions.m        2024-12-08 23:45:55 UTC (rev 14796)
+++ trunk/PDFView_SKExtensions.m        2024-12-09 09:45:57 UTC (rev 14797)
@@ -118,7 +118,6 @@
     NSView *pageView = [self safePageViewForPage:page];
     if (pageView)
         [pageView updateAnnotation:annotation];
-    [self annotationsChangedOnPage:page];
 }
 
 - (void)requiresDisplay {
@@ -129,7 +128,6 @@
     NSView *pageView = [self safePageViewForPage:page];
     if (pageView)
         [pageView addAnnotation:annotation];
-    [self annotationsChangedOnPage:page];
 }
 
 - (void)setNeedsDisplayForRemovedAnnotation:(PDFAnnotation *)annotation 
onPage:(PDFPage *)page {
@@ -136,7 +134,6 @@
     NSView *pageView = [self safePageViewForPage:page];
     if (pageView)
         [pageView removeAnnotation:annotation];
-    [self annotationsChangedOnPage:page];
 }
 
 - (void)doPdfsyncWithEvent:(NSEvent *)theEvent {

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2024-12-08 23:45:55 UTC (rev 14796)
+++ trunk/SKPDFView.m   2024-12-09 09:45:57 UTC (rev 14797)
@@ -2835,9 +2835,8 @@
 }
 
 - (void)setNeedsDisplay:(BOOL)needsRedraw forAnnotation:(PDFAnnotation 
*)annotation fromRect:(NSRect)oldRect {
-    PDFPage *page = [annotation page];
-    [self annotationsChangedOnPage:page];
     if (annotation == currentAnnotation && atomic_load(&highlightLayerState) 
!= SKLayerUse && needsRedraw) {
+        PDFPage *page = [annotation page];
         NSRect rect = NSUnionRect([annotation bounds], oldRect);
         CGFloat margin = (([annotation isResizable] || [annotation isNote]) ? 
HANDLE_SIZE  : 1.0) / [self scaleFactor];
         rect = NSInsetRect(rect, -margin, -margin);
@@ -3035,9 +3034,7 @@
 - (void)handleDidRemoveAnnotationNotification:(NSNotification *)notification {
     NSDictionary *userInfo = [notification userInfo];
     PDFAnnotation *annotation = [userInfo 
objectForKey:SKPDFDocumentAnnotationKey];
-    PDFPage *page = [userInfo objectForKey:SKPDFDocumentPageKey];
     
-    [self annotationsChangedOnPage:page];
     if ([annotation isNote])
         [self resetPDFToolTipRects];
 }
@@ -3051,10 +3048,8 @@
 - (void)handleDidMoveAnnotationNotification:(NSNotification *)notification {
     NSDictionary *userInfo = [notification userInfo];
     PDFAnnotation *annotation = [userInfo 
objectForKey:SKPDFDocumentAnnotationKey];
-    PDFPage *oldPage = [userInfo objectForKey:SKPDFDocumentOldPageKey];
     
     [self setNeedsDisplayForAnnotation:annotation];
-    [self annotationsChangedOnPage:oldPage];
     if ([annotation isNote])
         [self resetPDFToolTipRects];
     if ([self isEditingAnnotation:annotation])

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