Revision: 14684
http://sourceforge.net/p/skim-app/code/14684
Author: hofman
Date: 2024-11-14 15:22:18 +0000 (Thu, 14 Nov 2024)
Log Message:
-----------
local variable for document
Modified Paths:
--------------
trunk/SKMainWindowController.m
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2024-11-14 15:08:31 UTC (rev 14683)
+++ trunk/SKMainWindowController.m 2024-11-14 15:22:18 UTC (rev 14684)
@@ -293,6 +293,7 @@
NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
BOOL hasWindowSetup = [savedNormalSetup count] > 0;
NSWindow *window = [self window];
+ NSDocument *doc = [self document];
mwcFlags.needsCleanup = 0;
@@ -382,7 +383,7 @@
// NB: the next line will load the PDF document and annotations, so
necessary setup must be finished first!
// windowControllerDidLoadNib: is not called automatically because the
document overrides makeWindowControllers
- [[self document] windowControllerDidLoadNib:self];
+ [doc windowControllerDidLoadNib:self];
// Show/hide left side pane if necessary
BOOL hasOutline = ([[pdfView document] outlineRoot] != nil);
@@ -413,7 +414,7 @@
pageIndex = [[savedNormalSetup objectForKey:PAGEINDEX_KEY]
unsignedIntegerValue];
pointString = [savedNormalSetup objectForKey:SCROLLPOINT_KEY];
} else if ([sud boolForKey:SKRememberLastPageViewedKey]) {
- pageIndex = [[SKBookmarkController sharedBookmarkController]
pageIndexForRecentDocumentAtURL:[(NSDocument *)[self document] fileURL]];
+ pageIndex = [[SKBookmarkController sharedBookmarkController]
pageIndexForRecentDocumentAtURL:[doc fileURL]];
}
if (pageIndex != NSNotFound && [[pdfView document] pageCount] > pageIndex)
{
if ([[pdfView document] isLocked]) {
@@ -447,7 +448,7 @@
if (hasWindowSetup)
snapshotSetups = [savedNormalSetup objectForKey:SNAPSHOTS_KEY];
else if ([sud boolForKey:SKRememberSnapshotsKey])
- snapshotSetups = [[SKBookmarkController sharedBookmarkController]
snapshotsForRecentDocumentAtURL:[(NSDocument *)[self document] fileURL]];
+ snapshotSetups = [[SKBookmarkController sharedBookmarkController]
snapshotsForRecentDocumentAtURL:[doc fileURL]];
if ([snapshotSetups count]) {
if ([[pdfView document] isLocked])
[savedNormalSetup setObject:snapshotSetups forKey:SNAPSHOTS_KEY];
@@ -488,7 +489,7 @@
[savedNormalSetup removeAllObjects];
}
- [[self document] setRecentInfoNeedsUpdate:YES];
+ [doc setRecentInfoNeedsUpdate:YES];
mwcFlags.settingUpWindow = 0;
}
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