Revision: 13462
http://sourceforge.net/p/skim-app/code/13462
Author: hofman
Date: 2023-06-09 19:10:44 +0000 (Fri, 09 Jun 2023)
Log Message:
-----------
use ivar from rewind method
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2023-06-09 18:29:35 UTC (rev 13461)
+++ trunk/SKPDFView.m 2023-06-09 19:10:44 UTC (rev 13462)
@@ -1742,9 +1742,9 @@
#pragma mark Rewind
-- (void)scrollToPage:(PDFPage *)page {
- if ([self isPageAtIndexDisplayed:[page pageIndex]] == NO) {
- [self goToPage:page];
+- (void)rewind {
+ if ([self isPageAtIndexDisplayed:[rewindPage pageIndex]] == NO) {
+ [self goToPage:rewindPage];
return;
}
PDFDisplayMode mode = [self extendedDisplayMode];
@@ -1754,7 +1754,7 @@
NSRect bounds = [clipView bounds];
CGFloat inset = [self convertSize:NSMakeSize(0.0, [scrollView
contentInsets].top) toView:clipView].height;
NSRect docRect = [[scrollView documentView] frame];
- NSRect pageRect = [self convertRect:[self convertRect:[self
layoutBoundsForPage:page] fromPage:page] toView:clipView];
+ NSRect pageRect = [self convertRect:[self convertRect:[self
layoutBoundsForPage:rewindPage] fromPage:rewindPage] toView:clipView];
if ((mode & (kPDFDisplayHorizontalContinuous | kPDFDisplayTwoUp)) &&
NSWidth(docRect) > NSWidth(bounds)) {
bounds.origin.x = fmin(fmax(fmin(NSMidX(pageRect) - 0.5 *
NSWidth(bounds), NSMinX(pageRect)), NSMinX(docRect)), NSMaxX(docRect) -
NSWidth(bounds));
}
@@ -1778,12 +1778,12 @@
rewindPage = [[self currentPage] retain];
DISPATCH_MAIN_AFTER_SEC(0.0, ^{
if (rewindPage && [self pageForPoint:SKCenterPoint([self
visibleContentRect]) nearest:NO] != rewindPage)
- [self scrollToPage:rewindPage];
+ [self rewind];
});
DISPATCH_MAIN_AFTER_SEC(0.25, ^{
if (rewindPage) {
if ([[self currentPage] isEqual:rewindPage] == NO)
- [self scrollToPage:rewindPage];
+ [self rewind];
SKDESTROY(rewindPage);
}
});
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