Revision: 15937
          http://sourceforge.net/p/skim-app/code/15937
Author:   hofman
Date:     2025-12-29 16:55:35 +0000 (Mon, 29 Dec 2025)
Log Message:
-----------
call autoscroll on documentView

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2025-12-27 18:01:07 UTC (rev 15936)
+++ trunk/SKPDFView.m   2025-12-29 16:55:35 UTC (rev 15937)
@@ -4006,7 +4006,7 @@
     BOOL draggedAnnotation = NO;
     NSEvent *lastMouseEvent = theEvent;
     NSUInteger eventMask = NSEventMaskLeftMouseUp | 
NSEventMaskLeftMouseDragged;
-    NSClipView *clipView = [[self scrollView] contentView];
+    NSView *docView = [self documentView];
     
     [self 
setCursorForAreaOfInterest:SKAreaOfInterestForResizeHandle(resizeHandle, page)];
     if (resizeHandle == SKRectEdgesNone) {
@@ -4032,10 +4032,10 @@
             mousePoint = [self convertPoint:[theEvent locationInWindow] 
fromView:nil];
             if (resizeHandle == SKRectEdgesNone) {
                 lastMouseEvent = theEvent;
-                [clipView autoscroll:lastMouseEvent];
+                [docView autoscroll:lastMouseEvent];
             }
         } else if ([theEvent type] == NSEventTypePeriodic) {
-            if (draggedAnnotation == NO || [clipView 
autoscroll:lastMouseEvent] == NO)
+            if (draggedAnnotation == NO || [docView autoscroll:lastMouseEvent] 
== NO)
                 continue;
         }
         BOOL shiftDown = ([theEvent modifierFlags] & NSEventModifierFlagShift) 
!= 0;
@@ -4534,7 +4534,6 @@
     NSDate *lastPageChangeDate = [NSDate distantPast];
     BOOL isDoubleClick = [theEvent clickCount] == 2;
     NSView *docView = [self documentView];
-    NSClipView *clipView = [[self scrollView] contentView];
     
     lastMouseLoc = [self convertPoint:lastMouseLoc toView:docView];
     
@@ -4556,7 +4555,7 @@
         // dragging
         NSPoint mouseLocInWindow = [lastMouseEvent locationInWindow];
         NSPoint mouseLoc = [self convertPoint:mouseLocInWindow fromView:nil];
-        if ([clipView autoscroll:lastMouseEvent] == NO &&
+        if ([docView autoscroll:lastMouseEvent] == NO &&
             ([self displayMode] == kPDFDisplaySinglePage || [self displayMode] 
== kPDFDisplayTwoUp) &&
             [[NSDate date] timeIntervalSinceDate:lastPageChangeDate] > 0.7) {
             if (mouseLoc.y < NSMinY([self bounds])) {
@@ -4670,7 +4669,6 @@
 
 - (NSRect)doSelectRectWithEvent:(NSEvent *)theEvent didDrag:(BOOL *)didDrag {
     NSView *docView = [self documentView];
-    NSClipView *clipView = [[self scrollView] contentView];
     NSPoint startPoint = [docView convertPoint:[theEvent locationInWindow] 
fromView:nil];
     NSPoint currentPoint = startPoint;
     NSRect selRect = {startPoint, NSZeroSize};
@@ -4689,7 +4687,7 @@
         
         if ([theEvent type] == NSEventTypeLeftMouseDragged) {
             // change mouseLoc
-            [clipView autoscroll:theEvent];
+            [docView autoscroll:theEvent];
             currentPoint = [docView convertPoint:[theEvent locationInWindow] 
fromView:nil];
             dragged = YES;
         }

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