Revision: 14668 http://sourceforge.net/p/skim-app/code/14668 Author: hofman Date: 2024-11-10 16:55:23 +0000 (Sun, 10 Nov 2024) Log Message: ----------- Open snapshots from bookmark when not included in a setup
Modified Paths: -------------- trunk/SKDocumentController.m Modified: trunk/SKDocumentController.m =================================================================== --- trunk/SKDocumentController.m 2024-11-10 16:33:46 UTC (rev 14667) +++ trunk/SKDocumentController.m 2024-11-10 16:55:23 UTC (rev 14668) @@ -422,10 +422,14 @@ if (fileURL && [fileURL checkResourceIsReachableAndReturnError:NULL] && NO == [fileURL isTrashedFileURL]) { BOOL hasSetup = [bookmark hasSetup]; NSDictionary *setup = nil; - if (hasSetup) + NSArray *snapshots = nil; + if (hasSetup) { setup = [bookmark properties]; - else if ([bookmark pageIndex] != NSNotFound) - setup = @{@"page":[bookmark pageNumber]}; + } else { + snapshots = [bookmark snapshots]; + if ([bookmark pageIndex] != NSNotFound) + setup = @{@"page":[bookmark pageNumber]}; + } [self openDocumentWithContentsOfURL:fileURL display:hasSetup == NO completionHandler:^(NSDocument *document, BOOL documentWasAlreadyOpen, NSError *error){ if (document && setup) { if (hasSetup) { @@ -434,7 +438,10 @@ [document applySetup:setup]; [document showWindows]; } else { - [document applyOptions:setup]; + if (setup) + [document applyOptions:setup]; + if (snapshots) + [document applySetup:@{@"snapshots":snapshots}]; } } 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