Revision: 15873
http://sourceforge.net/p/skim-app/code/15873
Author: hofman
Date: 2025-12-16 10:39:08 +0000 (Tue, 16 Dec 2025)
Log Message:
-----------
local variables only when needed
Modified Paths:
--------------
trunk/SKMainWindowController_Actions.m
Modified: trunk/SKMainWindowController_Actions.m
===================================================================
--- trunk/SKMainWindowController_Actions.m 2025-12-15 17:27:10 UTC (rev
15872)
+++ trunk/SKMainWindowController_Actions.m 2025-12-16 10:39:08 UTC (rev
15873)
@@ -1102,12 +1102,11 @@
lastSplitPDFHeight = floor(DEFAULT_SPLIT_PDF_FACTOR *
(NSHeight(frame) - titleBarHeight));
CGFloat position = NSHeight(frame) - lastSplitPDFHeight -
[pdfSplitView dividerThickness];
- NSPoint point = frame.origin;
- PDFPage *page = nil;
- BOOL fixedAtBottom = [[[pdfView scrollView] contentView] isFlipped] ==
NO;
- BOOL createNew = secondaryPdfView == nil;
- if (createNew) {
+ if (secondaryPdfView == nil) {
+ NSPoint point = frame.origin;
+ PDFPage *page = nil;
+ BOOL fixedAtBottom = [[[pdfView scrollView] contentView]
isFlipped] == NO;
secondaryPdfView = [[SKSecondaryPDFView alloc]
initWithFrame:NSMakeRect(0.0, 0.0, NSWidth(frame), lastSplitPDFHeight)];
[secondaryPdfView setAutoresizingMask:NSViewWidthSizable |
NSViewHeightSizable];
[secondaryPdfView setHidden:YES];
@@ -1122,12 +1121,11 @@
[secondaryPdfView setDocument:[pdfView document]];
point.y += fixedAtBottom ? -lastSplitPDFHeight :
lastSplitPDFHeight + [pdfSplitView dividerThickness];
page = [pdfView pageForPoint:point nearest:YES];
- point = [pdfView convertPoint:point toPage:page];
[secondaryPdfView goToPage:page];
+ [secondaryPdfView layoutDocumentView];
NSClipView *clipView = [[secondaryPdfView scrollView] contentView];
- point = [secondaryPdfView convertPoint:[secondaryPdfView
convertPoint:point fromPage:page] toView:clipView];
+ point = [secondaryPdfView convertPoint:[secondaryPdfView
convertPoint:[pdfView convertPoint:point toPage:page] fromPage:page]
toView:clipView];
[clipView scrollPoint:point];
- [secondaryPdfView layoutDocumentView];
[secondaryPdfView resetHistory];
} else {
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