Revision: 5496
http://skim-app.svn.sourceforge.net/skim-app/?rev=5496&view=rev
Author: hofman
Date: 2009-07-19 13:17:35 +0000 (Sun, 19 Jul 2009)
Log Message:
-----------
do some checks after drawing new ink annotation
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2009-07-19 13:00:57 UTC (rev 5495)
+++ trunk/SKPDFView.m 2009-07-19 13:17:35 UTC (rev 5496)
@@ -3402,8 +3402,9 @@
PDFBorder *border = nil;
NSBezierPath *path;
BOOL didDraw = NO;
+ BOOL isExtension = ([theEvent modifierFlags] & NSShiftKeyMask) &&
[[activeAnnotation type] isEqualToString:SKNInkString] && [[activeAnnotation
page] isEqual:page];
- if (([theEvent modifierFlags] & NSShiftKeyMask) && [[activeAnnotation
type] isEqualToString:SKNInkString] && [[activeAnnotation page] isEqual:page]) {
+ if (isExtension) {
bezierPaths = [[NSArray alloc] initWithArray:[(PDFAnnotationInk
*)activeAnnotation paths] copyItems:YES];
NSAffineTransform *transform = [NSAffineTransform transform];
NSRect bounds = [activeAnnotation bounds];
@@ -3446,13 +3447,14 @@
if (didDraw) {
[self addAnnotationWithType:SKInkNote contents:nil page:page
bounds:NSZeroRect];
- if (pathColor)
- [activeAnnotation setColor:pathColor];
- if (border)
- [activeAnnotation setBorder:border];
- if (text)
- [activeAnnotation setString:text];
- [[self undoManager] setActionName:NSLocalizedString(@"Add Note",
@"Undo action name")];
+ if (activeAnnotation) {
+ if (isExtension) {
+ [activeAnnotation setColor:pathColor];
+ [activeAnnotation setBorder:border];
+ [activeAnnotation setString:text];
+ }
+ [[self undoManager] setActionName:NSLocalizedString(@"Add Note",
@"Undo action name")];
+ }
}
[bezierPaths release];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit