Revision: 9226 http://sourceforge.net/p/skim-app/code/9226 Author: hofman Date: 2017-01-28 22:35:30 +0000 (Sat, 28 Jan 2017) Log Message: ----------- Workaround for anchored notes not drawing on 10.12, draw them ourselves
Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2017-01-28 22:20:31 UTC (rev 9225) +++ trunk/SKPDFView.m 2017-01-28 22:35:30 UTC (rev 9226) @@ -163,6 +163,10 @@ @interface PDFView (SKSierraDeclarations) - (void)drawPage:(PDFPage *)page toContext:(CGContextRef)context; @end +@interface PDFAnnotation (SKPrivateDeclarations) +- (void)drawWithBox:(PDFDisplayBox)box inContext:(CGContextRef)context; +@end + #endif #pragma mark - @@ -424,6 +428,14 @@ // Let PDFView do most of the hard work. [super drawPage:pdfPage toContext:context]; + // On Sierra note annotations don't draw at all + if ((NSInteger)floor(NSAppKitVersionNumber) == NSAppKitVersionNumber10_12) { + for (PDFAnnotation *annotation in [pdfPage annotations]) { + if ([annotation isNote]) + [annotation drawWithBox:[self displayBox] inContext:context]; + } + } + [PDFAnnotation setCurrentActiveAnnotation:nil]; [self drawPageHighlights:pdfPage toContext:context]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit