Revision: 15366 http://sourceforge.net/p/skim-app/code/15366 Author: hofman Date: 2025-06-04 14:35:45 +0000 (Wed, 04 Jun 2025) Log Message: ----------- use applySetup instead of applyOptions to open a document with a non-setup bopokmark
Modified Paths: -------------- trunk/SKDocumentController.m Modified: trunk/SKDocumentController.m =================================================================== --- trunk/SKDocumentController.m 2025-06-04 14:18:53 UTC (rev 15365) +++ trunk/SKDocumentController.m 2025-06-04 14:35:45 UTC (rev 15366) @@ -417,14 +417,10 @@ if (fileURL && [fileURL checkResourceIsReachableAndReturnError:NULL] && NO == [fileURL isTrashedFileURL]) { BOOL hasSetup = [bookmark hasSetup]; NSDictionary *setup = nil; - NSArray *snapshots = nil; - if (hasSetup) { + if (hasSetup) setup = [bookmark properties]; - } else { - snapshots = [bookmark snapshots]; - if ([bookmark pageIndex] != NSNotFound) - setup = @{@"page":[bookmark pageNumber]}; - } + else if ([bookmark pageIndex] != NSNotFound) + setup = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInteger:[bookmark pageIndex]], @"pageIndex", [bookmark snapshots], @"snapshots", nil]; [self openDocumentWithContentsOfURL:fileURL display:hasSetup == NO completionHandler:^(NSDocument *document, BOOL documentWasAlreadyOpen, NSError *error){ if (document && setup) { if (hasSetup) { @@ -433,9 +429,7 @@ [document applySetup:setup]; [document showWindows]; } else { - [document applyOptions:setup]; - if (snapshots) - [document applySetup:@{@"snapshots":snapshots}]; + [document applySetup:setup]; } } if (completionHandler) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit