Revision: 15611
          http://sourceforge.net/p/skim-app/code/15611
Author:   hofman
Date:     2025-07-06 16:57:32 +0000 (Sun, 06 Jul 2025)
Log Message:
-----------
we can just use originalBounds. Autoscroll from main event handler.

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2025-07-06 15:44:07 UTC (rev 15610)
+++ trunk/SKPDFView.m   2025-07-06 16:57:32 UTC (rev 15611)
@@ -3830,8 +3830,6 @@
 
 - (void)doMoveAnnotationWithEvent:(NSEvent *)theEvent offset:(NSPoint)offset {
     // Move annotation.
-    [[[self scrollView] contentView] autoscroll:theEvent];
-    
     NSPoint point = NSZeroPoint;
     PDFPage *newActivePage = [self pageAndPoint:&point forEvent:theEvent 
nearest:YES];
     
@@ -4118,14 +4116,17 @@
         } else if ([theEvent type] == NSEventTypeLeftMouseDragged) {
             if (draggedAnnotation == NO) {
                 if (currentAnnotation == nil)
-                    [self addAnnotationWithType:noteType selection:nil 
page:page bounds:SKRectFromCenterAndSquareSize(originalBounds.origin, 0.0)];
+                    [self addAnnotationWithType:noteType selection:nil 
page:page bounds:originalBounds];
                 else if (shouldAddAnnotation == NO)
                     [self beginNewUndoGroupIfNeeded];
                 draggedAnnotation = YES;
             }
             lastMouseEvent = theEvent;
-        } else if (currentAnnotation == nil) {
-            continue;
+            if (resizeHandle == 0)
+                [[[self scrollView] contentView] autoscroll:theEvent];
+        } else if ([theEvent type] == NSEventTypePeriodic) {
+            if (currentAnnotation == nil || [[[self scrollView] contentView] 
autoscroll:lastMouseEvent] == NO)
+                continue;
         }
         if (resizeHandle == 0)
             [self doMoveAnnotationWithEvent:lastMouseEvent offset:offset];

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