Revision: 15884
http://sourceforge.net/p/skim-app/code/15884
Author: hofman
Date: 2025-12-17 17:03:07 +0000 (Wed, 17 Dec 2025)
Log Message:
-----------
local variable for clipview to autoscroll
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-12-17 16:56:31 UTC (rev 15883)
+++ trunk/SKPDFView.m 2025-12-17 17:03:07 UTC (rev 15884)
@@ -4067,6 +4067,7 @@
BOOL draggedAnnotation = NO;
NSEvent *lastMouseEvent = theEvent;
NSUInteger eventMask = NSEventMaskLeftMouseUp |
NSEventMaskLeftMouseDragged;
+ NSClipView *clipView = [[self scrollView] contentView];
[self
setCursorForAreaOfInterest:SKAreaOfInterestForResizeHandle(resizeHandle, page)];
if (resizeHandle == SKRectEdgesNone) {
@@ -4092,10 +4093,10 @@
mousePoint = [theEvent locationInView:self];
if (resizeHandle == SKRectEdgesNone) {
lastMouseEvent = theEvent;
- [[[self scrollView] contentView] autoscroll:lastMouseEvent];
+ [clipView autoscroll:lastMouseEvent];
}
} else if ([theEvent type] == NSEventTypePeriodic) {
- if (draggedAnnotation == NO || [[[self scrollView] contentView]
autoscroll:lastMouseEvent] == NO)
+ if (draggedAnnotation == NO || [clipView
autoscroll:lastMouseEvent] == NO)
continue;
}
BOOL shiftDown = ([theEvent modifierFlags] & NSEventModifierFlagShift)
!= 0;
@@ -4594,6 +4595,7 @@
NSDate *lastPageChangeDate = [NSDate distantPast];
BOOL isDoubleClick = [theEvent clickCount] == 2;
NSView *docView = [self documentView];
+ NSClipView *clipView = [[self scrollView] contentView];
lastMouseLoc = [self convertPoint:lastMouseLoc toView:docView];
@@ -4615,7 +4617,7 @@
// dragging
NSPoint mouseLocInWindow = [lastMouseEvent locationInWindow];
NSPoint mouseLoc = [self convertPoint:mouseLocInWindow fromView:nil];
- if ([[[self scrollView] contentView] autoscroll:lastMouseEvent] == NO
&&
+ if ([clipView autoscroll:lastMouseEvent] == NO &&
([self displayMode] == kPDFDisplaySinglePage || [self displayMode]
== kPDFDisplayTwoUp) &&
[[NSDate date] timeIntervalSinceDate:lastPageChangeDate] > 0.7) {
if (mouseLoc.y < NSMinY([self bounds])) {
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