Revision: 15966
http://sourceforge.net/p/skim-app/code/15966
Author: hofman
Date: 2026-01-06 18:22:45 +0000 (Tue, 06 Jan 2026)
Log Message:
-----------
no need for two local variables
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2026-01-06 18:13:00 UTC (rev 15965)
+++ trunk/SKPDFView.m 2026-01-06 18:22:45 UTC (rev 15966)
@@ -4532,8 +4532,6 @@
PDFPage *readingBarPage = [readingBar page];
PDFPage *page = readingBarPage;
NSInteger numberOfLines = [[page lineRects] count];
- NSInteger lineAngle = [page lineDirectionAngle];
-
NSEvent *lastMouseEvent = theEvent;
NSPoint lastMouseLoc = [self convertPoint:[theEvent locationInWindow]
fromView:nil];
NSPoint point = [self convertPoint:lastMouseLoc toPage:page];
@@ -4560,8 +4558,7 @@
}
// dragging
- NSPoint mouseLocInWindow = [lastMouseEvent locationInWindow];
- NSPoint mouseLoc = [self convertPoint:mouseLocInWindow fromView:nil];
+ NSPoint mouseLoc = [self convertPoint:[lastMouseEvent
locationInWindow] fromView:nil];
if ([docView autoscroll:lastMouseEvent] == NO &&
([self displayMode] & kPDFDisplaySinglePageContinuous) == 0 &&
[[NSDate date] timeIntervalSinceDate:lastPageChangeDate] > 0.7) {
@@ -4580,22 +4577,16 @@
}
}
- mouseLoc = [self convertPoint:mouseLocInWindow fromView:nil];
-
PDFPage *mousePage = [self pageForPoint:mouseLoc nearest:YES];
-
if ([mousePage isEqual:page] == NO) {
page = mousePage;
numberOfLines = [[page lineRects] count];
- lineAngle = [page lineDirectionAngle];
}
if (numberOfLines > 0) {
NSPoint mouseLocInPage = [self convertPoint:mouseLoc
toPage:mousePage];
NSPoint mouseLocInDocument = [self convertPoint:mouseLoc
toView:docView];
- NSInteger currentLine;
-
- currentLine = [page indexOfLineRectAtPoint:mouseLocInPage
lower:mouseLocInDocument.y < lastMouseLoc.y] - lineOffset;
+ NSInteger currentLine = [page
indexOfLineRectAtPoint:mouseLocInPage lower:mouseLocInDocument.y <
lastMouseLoc.y] - lineOffset;
currentLine = MAX(0, MIN(numberOfLines - (NSInteger)[readingBar
numberOfLines], currentLine));
if ([page isEqual:readingBarPage] == NO || currentLine !=
[readingBar currentLine]) {
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