Revision: 16009
http://sourceforge.net/p/skim-app/code/16009
Author: hofman
Date: 2026-01-12 18:05:46 +0000 (Mon, 12 Jan 2026)
Log Message:
-----------
use ++/-- to increase/decrease page index
Modified Paths:
--------------
trunk/SKBasePDFView.m
Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m 2026-01-12 17:59:43 UTC (rev 16008)
+++ trunk/SKBasePDFView.m 2026-01-12 18:05:46 UTC (rev 16009)
@@ -320,10 +320,11 @@
[self horizontallyGoToPage:[doc pageAtIndex:[doc indexForPage:[self
currentPage]] - 1]];
} else {
PDFDocument *doc = [self document];
- NSInteger i = [doc indexForPage:[self currentPage]];
- i -= (displayMode == kPDFDisplayTwoUpContinuous && (i > 1 || [self
displaysAsBook] == NO)) ? 2 : 1;
+ NSUInteger i = [doc indexForPage:[self currentPage]];
+ if (displayMode == kPDFDisplayTwoUpContinuous && (i > 1 || [self
displaysAsBook] == NO))
+ --i;
[super goToPreviousPage:sender];
- if (i >= 0)
+ if (i-- > 0)
[self scrollToPage:[doc pageAtIndex:i]
mode:kPDFDisplaySinglePageContinuous];
}
}
@@ -338,9 +339,10 @@
} else {
PDFDocument *doc = [self document];
NSUInteger i = [doc indexForPage:[self currentPage]];
- i += (displayMode == kPDFDisplayTwoUpContinuous && (i > 0 || [self
displaysAsBook] == NO) && i + 2 < [doc pageCount]) ? 2 : 1;
+ if (displayMode == kPDFDisplayTwoUpContinuous && (i > 0 || [self
displaysAsBook] == NO) && i + 2 < [doc pageCount])
+ ++i;
[super goToNextPage:sender];
- if (i < [doc pageCount])
+ if (++i < [doc pageCount])
[self scrollToPage:[doc pageAtIndex:i]
mode:kPDFDisplaySinglePageContinuous];
}
}
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