Revision: 15367 http://sourceforge.net/p/skim-app/code/15367 Author: hofman Date: 2025-06-04 14:52:15 +0000 (Wed, 04 Jun 2025) Log Message: ----------- remove keys at once, make variable more local
Modified Paths: -------------- trunk/SKMainDocument.m Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-06-04 14:35:45 UTC (rev 15366) +++ trunk/SKMainDocument.m 2025-06-04 14:52:15 UTC (rev 15367) @@ -251,14 +251,12 @@ } - (void)applyOptions:(NSDictionary *)options { - SKPDFView *pdfView = [self pdfView]; NSInteger page = [[options objectForKey:@"page"] integerValue]; NSString *searchString = [options objectForKey:@"search"]; NSMutableDictionary *settings = [options mutableCopy]; - [settings removeObjectForKey:@"page"]; - [settings removeObjectForKey:@"point"]; - [settings removeObjectForKey:@"search"]; + [settings removeObjectsForKeys:@[@"page", @"point", @"search"]]; if ([settings count]) { + SKPDFView *pdfView = [self pdfView]; if (page == 0 && [[pdfView currentPage] pageIndex] > 0) [pdfView setDisplaySettingsAndRewind:settings]; else @@ -265,6 +263,7 @@ [pdfView setDisplaySettings:settings]; } if (page > 0) { + SKPDFView *pdfView = [self pdfView]; page = MIN(page, (NSInteger)[[pdfView document] pageCount]); NSString *pointString = [options objectForKey:@"point"]; if ([pointString length] > 0) { 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