|
From: <ho...@us...> - 2025-10-25 09:18:23
|
Revision: 15707
http://sourceforge.net/p/skim-app/code/15707
Author: hofman
Date: 2025-10-25 09:18:22 +0000 (Sat, 25 Oct 2025)
Log Message:
-----------
local variable for documentView
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-10-24 22:13:00 UTC (rev 15706)
+++ trunk/SKPDFView.m 2025-10-25 09:18:22 UTC (rev 15707)
@@ -4587,8 +4587,9 @@
NSInteger lineOffset = [page indexOfLineRectAtPoint:point lower:YES] - [readingBar currentLine];
NSDate *lastPageChangeDate = [NSDate distantPast];
BOOL isDoubleClick = [theEvent clickCount] == 2;
+ NSView *docView = [self documentView];
- lastMouseLoc = [self convertPoint:lastMouseLoc toView:[self documentView]];
+ lastMouseLoc = [self convertPoint:lastMouseLoc toView:docView];
[[NSCursor closedHandBarCursor] push];
@@ -4614,13 +4615,13 @@
if (mouseLoc.y < NSMinY([self bounds])) {
if ([self canGoToNextPage]) {
[self goToNextPage:self];
- lastMouseLoc.y = NSMaxY([[self documentView] bounds]);
+ lastMouseLoc.y = NSMaxY([docView bounds]);
lastPageChangeDate = [NSDate date];
}
} else if (mouseLoc.y > NSMaxY([self bounds])) {
if ([self canGoToPreviousPage]) {
[self goToPreviousPage:self];
- lastMouseLoc.y = NSMinY([[self documentView] bounds]);
+ lastMouseLoc.y = NSMinY([docView bounds]);
lastPageChangeDate = [NSDate date];
}
}
@@ -4630,7 +4631,7 @@
PDFPage *mousePage = [self pageForPoint:mouseLoc nearest:YES];
NSPoint mouseLocInPage = [self convertPoint:mouseLoc toPage:mousePage];
- NSPoint mouseLocInDocument = [self convertPoint:mouseLoc toView:[self documentView]];
+ NSPoint mouseLocInDocument = [self convertPoint:mouseLoc toView:docView];
NSInteger currentLine;
if ([mousePage isEqual:page] == NO) {
@@ -4772,10 +4773,11 @@
BOOL dragged = NO;
NSRect selRect = [self doSelectRectWithEvent:theEvent didDrag:&dragged];
+ NSView *docView = [self documentView];
- NSPoint point = [self convertPoint:SKCenterPoint(selRect) fromView:[self documentView]];
+ NSPoint point = [self convertPoint:SKCenterPoint(selRect) fromView:docView];
PDFPage *page = [self pageForPoint:point nearest:YES];
- NSRect rect = [self convertRect:selRect fromView:[self documentView]];
+ NSRect rect = [self convertRect:selRect fromView:docView];
NSRect bounds;
NSInteger factor = 1;
BOOL autoFits = YES;
@@ -4782,7 +4784,7 @@
if (dragged) {
- bounds = [self convertRect:[[self documentView] bounds] fromView:[self documentView]];
+ bounds = [self convertRect:[docView bounds] fromView:docView];
if (NSWidth(rect) < 40.0 && NSHeight(rect) < 40.0)
factor = 3;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|