Revision: 2604 http://skim-app.svn.sourceforge.net/skim-app/?rev=2604&view=rev Author: hofman Date: 2007-08-05 05:58:57 -0700 (Sun, 05 Aug 2007)
Log Message: ----------- Remove border when a note was saved with zero line width. Modified Paths: -------------- trunk/SKPDFAnnotationNote.m Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-08-03 16:40:12 UTC (rev 2603) +++ trunk/SKPDFAnnotationNote.m 2007-08-05 12:58:57 UTC (rev 2604) @@ -189,14 +189,19 @@ originalSetContents(self, @selector(setContents:), contents); if (color) originalSetColor(self, @selector(setColor:), color); - if ((lineWidth || borderStyle || dashPattern) && [self border] == nil) - originalSetBorder(self, @selector(setBorder:), [[[PDFBorder alloc] init] autorelease]); - if (lineWidth) - [[self border] setLineWidth:[lineWidth floatValue]]; - if (borderStyle) - [[self border] setStyle:[lineWidth intValue]]; - if (dashPattern) - [[self border] setDashPattern:dashPattern]; + if (lineWidth == nil && borderStyle == nil && dashPattern == nil) { + if ([self border]) + originalSetBorder(self, @selector(setBorder:), nil); + } else { + if ([self border] == nil) + originalSetBorder(self, @selector(setBorder:), [[[PDFBorder alloc] init] autorelease]); + if (lineWidth) + [[self border] setLineWidth:[lineWidth floatValue]]; + if (borderStyle) + [[self border] setStyle:[lineWidth intValue]]; + if (dashPattern) + [[self border] setDashPattern:dashPattern]; + } } return self; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit