|
@@ -218,26 +218,26 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
|
[self doDrawRedactErasureWithEvent:theEvent];
|
|
|
} else if (CDigitalSignToolMode == self.toolMode) {
|
|
|
[self doFormWithEvent:theEvent];
|
|
|
+ } else if (CEditLinkToolMode == self.toolMode) {
|
|
|
+ if (self.isSetLinkDestinationArea) {
|
|
|
+ [self doDrawLinkDestinationAreaWithEvent:theEvent];
|
|
|
+ } else {
|
|
|
+ NSPoint newpoint = [self convertPoint:[theEvent locationInWindow] fromView:nil];
|
|
|
+ CPDFAreaOfInterest area1 = [self areaOfInterestForPoint:newpoint];
|
|
|
+ if (area1 & CPDFTextArea) {
|
|
|
+ [super mouseDown:theEvent];
|
|
|
+ [self doMarkUpWithEvent:theEvent];
|
|
|
+ [self setCurrentSelection:nil];
|
|
|
+ } else {
|
|
|
+ [self doDrawLinkNoteWithEvent:theEvent];
|
|
|
+ }
|
|
|
+ }
|
|
|
} else if ((CNoteToolMode == self.toolMode && ![CPDFListView isMarkupAnnotationType:self.annotationType] && CAnnotationTypeUnkown != self.annotationType) ||
|
|
|
- CFormToolMode == self.toolMode) {
|
|
|
+ CFormToolMode == self.toolMode) {
|
|
|
if (CAnnotationTypeEraser == self.annotationType) {
|
|
|
[self doEraseAnnotationsWithEvent:theEvent];
|
|
|
} else if (CAnnotationTypeInk == self.annotationType) {
|
|
|
[self doDrawFreehandNoteWithEvent:theEvent];
|
|
|
- } else if(CAnnotationTypeLink == self.annotationType ) {
|
|
|
- if (self.isSetLinkDestinationArea) {
|
|
|
- [self doDrawLinkDestinationAreaWithEvent:theEvent];
|
|
|
- } else {
|
|
|
- NSPoint newpoint = [self convertPoint:[theEvent locationInWindow] fromView:nil];
|
|
|
- CPDFAreaOfInterest area1 = [self areaOfInterestForPoint:newpoint];
|
|
|
- if (area1 & CPDFTextArea) {
|
|
|
- [super mouseDown:theEvent];
|
|
|
- [self doMarkUpWithEvent:theEvent];
|
|
|
- [self setCurrentSelection:nil];
|
|
|
- } else {
|
|
|
- [self doDrawLinkNoteWithEvent:theEvent];
|
|
|
- }
|
|
|
- }
|
|
|
} else if (self.toolMode == CFormToolMode) {
|
|
|
NSPoint p = [theEvent locationInWindow];
|
|
|
NSPoint currentPoint = [self convertPoint:p fromView:nil];
|
|
@@ -475,7 +475,7 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
|
if([newActiveAnnotation isKindOfClass:[CPDFLinkAnnotation class]]) {
|
|
|
if(self.popOver == nil && (CTextToolMode == self.toolMode ||
|
|
|
CMoveToolMode == self.toolMode ||
|
|
|
- CEditPDFToolLink == self.toolMode)) {
|
|
|
+ CEditLinkToolMode == self.toolMode)) {
|
|
|
CPDFLinkAnnotation *linkNewAnnotation = (CPDFLinkAnnotation *)newActiveAnnotation;
|
|
|
if(linkNewAnnotation.destination != nil) {
|
|
|
[[KMImageToolTipWindow shared] showForImageContext:linkNewAnnotation at:NSZeroPoint];
|
|
@@ -490,7 +490,7 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(!(CTextToolMode == self.toolMode || CEditPDFToolLink == self.toolMode || CMoveToolMode == self.toolMode)) {
|
|
|
+ if(!(CTextToolMode == self.toolMode || CEditLinkToolMode == self.toolMode || CMoveToolMode == self.toolMode)) {
|
|
|
clickNewActiveAnnotation = nil;
|
|
|
}
|
|
|
} else if([newActiveAnnotation isKindOfClass:[CPDFRedactAnnotation class]]) {
|
|
@@ -771,7 +771,7 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
|
self.hoverAnnotation = nil;
|
|
|
[self setNeedsDisplayAnnotation:annotation];
|
|
|
}
|
|
|
- if([self toolMode] != CEditPDFToolLink) {
|
|
|
+ if([self toolMode] != CEditLinkToolMode) {
|
|
|
annotation = nil;
|
|
|
}
|
|
|
}
|