Revision: 7526
http://skim-app.svn.sourceforge.net/skim-app/?rev=7526&view=rev
Author: hofman
Date: 2011-10-25 17:02:27 +0000 (Tue, 25 Oct 2011)
Log Message:
-----------
combine code
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2011-10-25 10:55:59 UTC (rev 7525)
+++ trunk/SKPDFView.m 2011-10-25 17:02:27 UTC (rev 7526)
@@ -3299,34 +3299,32 @@
newActiveAnnotation = nil;
mouseDownInAnnotation = YES;
} else if ((modifiers & NSShiftKeyMask) && activeAnnotation !=
newActiveAnnotation && [[activeAnnotation page] isEqual:[newActiveAnnotation
page]] && [[activeAnnotation type] isEqualToString:[newActiveAnnotation type]])
{
+ PDFAnnotation *newAnnotation = nil;
if ([activeAnnotation isMarkup]) {
NSInteger markupType = [(PDFAnnotationMarkup
*)activeAnnotation markupType];
PDFSelection *sel = [(PDFAnnotationMarkup *)activeAnnotation
selection];
[sel addSelection:[(PDFAnnotationMarkup *)newActiveAnnotation
selection]];
- [self removeAnnotation:newActiveAnnotation];
- newActiveAnnotation = [[[PDFAnnotationMarkup alloc]
initSkimNoteWithSelection:sel markupType:markupType] autorelease];
- [newActiveAnnotation setString:[sel cleanedString]];
- [newActiveAnnotation setColor:[activeAnnotation color]];
- [newActiveAnnotation registerUserName];
- [self removeActiveAnnotation:nil];
- [self addAnnotation:newActiveAnnotation toPage:page];
- [[self documentUndoManager]
setActionName:NSLocalizedString(@"Join Notes", @"Undo action name")];
+ newAnnotation = [[[PDFAnnotationMarkup alloc]
initSkimNoteWithSelection:sel markupType:markupType] autorelease];
+ [newAnnotation setString:[sel cleanedString]];
} else if ([[activeAnnotation type] isEqualToString:SKNInkString])
{
NSMutableArray *paths = [[(PDFAnnotationInk *)activeAnnotation
pagePaths] mutableCopy];
[paths addObjectsFromArray:[(PDFAnnotationInk
*)newActiveAnnotation pagePaths]];
+ newAnnotation = [[[PDFAnnotationInk alloc]
initSkimNoteWithPaths:paths] autorelease];
+ [newAnnotation setString:[activeAnnotation string]];
+ [newAnnotation setBorder:[activeAnnotation border]];
+
+ [paths release];
+ }
+ if (newAnnotation) {
+ [newAnnotation setColor:[activeAnnotation color]];
+ [newAnnotation registerUserName];
[self removeAnnotation:newActiveAnnotation];
- newActiveAnnotation = [[[PDFAnnotationInk alloc]
initSkimNoteWithPaths:paths] autorelease];
- [newActiveAnnotation setString:[activeAnnotation string]];
- [newActiveAnnotation setColor:[activeAnnotation color]];
- [newActiveAnnotation setBorder:[activeAnnotation border]];
- [newActiveAnnotation registerUserName];
[self removeActiveAnnotation:nil];
- [self addAnnotation:newActiveAnnotation toPage:page];
+ [self addAnnotation:newAnnotation toPage:page];
[[self documentUndoManager]
setActionName:NSLocalizedString(@"Join Notes", @"Undo action name")];
-
- [paths release];
+ newActiveAnnotation = newAnnotation;
}
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit