Revision: 14587
http://sourceforge.net/p/skim-app/code/14587
Author: hofman
Date: 2024-10-26 21:43:51 +0000 (Sat, 26 Oct 2024)
Log Message:
-----------
Make sure note annotation has the correct subtype
Modified Paths:
--------------
trunk/SkimNotes/SKNPDFAnnotationNote.m
Modified: trunk/SkimNotes/SKNPDFAnnotationNote.m
===================================================================
--- trunk/SkimNotes/SKNPDFAnnotationNote.m 2024-10-26 16:24:36 UTC (rev
14586)
+++ trunk/SkimNotes/SKNPDFAnnotationNote.m 2024-10-26 21:43:51 UTC (rev
14587)
@@ -117,6 +117,12 @@
NSNumber *drawImage = [dict
objectForKey:SKNPDFAnnotationDrawsImageKey];
if ([drawImage respondsToSelector:@selector(boolValue)])
_drawsImage = [drawImage boolValue];
+ else if ([[dict objectForKey:SKNPDFAnnotationTypeKey]
isEqualToString:SKNTextString])
+ _drawsImage = NO;
+ else if ([[dict objectForKey:SKNPDFAnnotationTypeKey]
isEqualToString:SKNStampString])
+ _drawsImage = YES;
+ if ([self respondsToSelector:@selector(setValue:forAnnotationKey:)])
+ [self setValue:_drawsImage ? @"/Stamp" : @"/Text"
forAnnotationKey:@"/Subtype"];
if ([anImage isKindOfClass:imageClass])
_image = anImage;
else if ([anImage isKindOfClass:dataClass])
@@ -149,9 +155,8 @@
- (void)setDrawsImage:(BOOL)drawsImage {
if (drawsImage != _drawsImage) {
_drawsImage = drawsImage;
- if ([self respondsToSelector:@selector(setValue:forAnnotationKey:)]) {
+ if ([self respondsToSelector:@selector(setValue:forAnnotationKey:)])
[self setValue:_drawsImage ? @"/Stamp" : @"/Text"
forAnnotationKey:@"/Subtype"];
- }
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit