Revision: 15416 http://sourceforge.net/p/skim-app/code/15416 Author: hofman Date: 2025-06-08 21:59:01 +0000 (Sun, 08 Jun 2025) Log Message: ----------- don't use continue
Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-08 21:49:24 UTC (rev 15415) +++ trunk/SKMainWindowController.m 2025-06-08 21:59:01 UTC (rev 15416) @@ -1019,20 +1019,20 @@ for (NSDictionary *dict in noteDicts) { if ([[dict objectForKey:SKNPDFAnnotationTypeKey] isEqualToString:SKNWidgetString]) { [widgetDicts addObject:dict]; - continue; - } - @autoreleasepool{ - PDFAnnotation *annotation = [PDFAnnotation newSkimNoteWithProperties:dict]; - if (annotation) { - NSUInteger pageIndex = [[dict objectForKey:SKNPDFAnnotationPageIndexKey] unsignedIntegerValue]; - if (pageIndex == NSNotFound) - pageIndex = 0; - else if (pageIndex >= [pdfDoc pageCount]) - pageIndex = [pdfDoc pageCount] - 1; - PDFPage *page = [pdfDoc pageAtIndex:pageIndex]; - if (autoUpdate && [[annotation contents] length] == 0) - [annotation autoUpdateStringWithPage:page]; - [notesAndPagesToAdd addObject:@[annotation, page]]; + } else { + @autoreleasepool{ + PDFAnnotation *annotation = [PDFAnnotation newSkimNoteWithProperties:dict]; + if (annotation) { + NSUInteger pageIndex = [[dict objectForKey:SKNPDFAnnotationPageIndexKey] unsignedIntegerValue]; + if (pageIndex == NSNotFound) + pageIndex = 0; + else if (pageIndex >= [pdfDoc pageCount]) + pageIndex = [pdfDoc pageCount] - 1; + PDFPage *page = [pdfDoc pageAtIndex:pageIndex]; + if (autoUpdate && [[annotation contents] length] == 0) + [annotation autoUpdateStringWithPage:page]; + [notesAndPagesToAdd addObject:@[annotation, page]]; + } } } } 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