Procházet zdrojové kódy

Merge branch 'develop_PDFReaderProV4.6.0' of git.kdan.cc:Mac_PDF/PDF_Office into develop_PDFReaderProV4.6.0

tangchao před 6 měsíci
rodič
revize
d7e8f206e3

+ 15 - 12
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Event.m

@@ -145,19 +145,22 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
         } else if ([newActiveAnnotation isKindOfClass:[CPDFPolygonAnnotation class]] && self.clickPolygonAnnotation) {
             [self doDragAddAnnotationWithEvent:theEvent];
         } else {
-            if ([newActiveAnnotation isKindOfClass:[CPDFSignatureWidgetAnnotation class]]) {
+            if([newActiveAnnotation isForm]) {
                 if (self.toolMode == CFormToolMode) {
+                    CPDFPage *page = self.activeAnnotation.page;
+                    if (![self.activeAnnotations containsObject:newActiveAnnotation]) {
+                        [self updateActiveAnnotations:@[newActiveAnnotation]];
+                        [self setNeedsDisplayAnnotationViewForPage:page];
+                    }
                     [self doDragAnnotationWithEvent:theEvent forAnnotation:self.activeAnnotation];
                 } else {
-                    [self showEditableFormAnnotationEditor:self.activeAnnotation];
-                }
-                return;
-            } else if ([newActiveAnnotation isKindOfClass:[CPDFSignatureWidgetAnnotation class]]) {
-                if (self.toolMode == CFormToolMode) {
-                    [self doDragAnnotationWithEvent:theEvent forAnnotation:newActiveAnnotation];
-                } else {
-                    [self showEditableFormAnnotationEditor:newActiveAnnotation];
+                    if ([newActiveAnnotation isKindOfClass:[CPDFSignatureWidgetAnnotation class]]) {
+                        [self showEditableFormAnnotationEditor:newActiveAnnotation];
+                    } else {
+                        [super mouseDown:theEvent];
+                    }
                 }
+                
                 return;
             }
             if ([newActiveAnnotation isKindOfClass:[KMTableAnnotation class]]) {
@@ -4371,9 +4374,9 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
         newActiveAnnotation = nil;
     }
     
-    if (([newActiveAnnotation isForm]) && self.toolMode != CFormToolMode) {
-        newActiveAnnotation = nil;
-    }
+//    if (([newActiveAnnotation isForm]) && self.toolMode != CFormToolMode) {
+//        newActiveAnnotation = nil;
+//    }
     
     if([newActiveAnnotation isKindOfClass:[CPDFInkAnnotation class]]) {
         if(self.annotationType == CAnnotationTypeInk || self.annotationType == CAnnotationTypeEraser)