Browse Source

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

tangchao 6 months ago
parent
commit
8f6812f134

+ 1 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Event.m

@@ -109,6 +109,7 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
         [super mouseDown:theEvent];
         [super mouseDown:theEvent];
     } else if ([self isSupportSelectAnnotation] &&
     } else if ([self isSupportSelectAnnotation] &&
                !(self.clickLineAnnotation && self.isClickDoubleCreatLine) &&
                !(self.clickLineAnnotation && self.isClickDoubleCreatLine) &&
+               !(self.clickSquareFronPolygonAnnotation) &&
                [self doClickAnnotationWithEvent:theEvent forAnnotation:&newActiveAnnotation]) {
                [self doClickAnnotationWithEvent:theEvent forAnnotation:&newActiveAnnotation]) {
         if(modifiers == NSEventModifierFlagCommand) {
         if(modifiers == NSEventModifierFlagCommand) {
             if ([self.activeAnnotations containsObject:newActiveAnnotation]) {
             if ([self.activeAnnotations containsObject:newActiveAnnotation]) {

+ 3 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+KeyEvent.m

@@ -122,6 +122,9 @@
         [self endMeasureModeAddAnnotation];
         [self endMeasureModeAddAnnotation];
         [self setNeedsDisplayAnnotationViewForVisiblePages];
         [self setNeedsDisplayAnnotationViewForVisiblePages];
         [self setAnnotationType:CAnnotationTypeUnkown];
         [self setAnnotationType:CAnnotationTypeUnkown];
+        if (self.pdfListViewDelegate && [self.pdfListViewDelegate respondsToSelector:@selector(PDFListViewMeasureCancel:)]) {
+            [self.pdfListViewDelegate PDFListViewMeasureCancel:self];
+        }
     } else if (CAnnotationTypeUnkown != [self annotationType] && eventChar == CPDFListEscapeCharacter) {
     } else if (CAnnotationTypeUnkown != [self annotationType] && eventChar == CPDFListEscapeCharacter) {
         if ((self.toolMode == CEditPDFToolMode) && (self.annotationType == CAnnotationTypeAddText || self.annotationType == CAnnotationTypeAddImage)) {
         if ((self.toolMode == CEditPDFToolMode) && (self.annotationType == CAnnotationTypeAddText || self.annotationType == CAnnotationTypeAddImage)) {
 //            [[NSNotificationCenter defaultCenter] postNotificationName:@"CEditPDFToolModeChangeStateUnkown" object:self];
 //            [[NSNotificationCenter defaultCenter] postNotificationName:@"CEditPDFToolModeChangeStateUnkown" object:self];

+ 1 - 0
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift

@@ -2404,6 +2404,7 @@ extension KMMainViewController {
             self.model.rightPanelIsOpen = false
             self.model.rightPanelIsOpen = false
             self.toolbarController.cancelSelected(KMRightControlToolbarItemIdentifier)
             self.toolbarController.cancelSelected(KMRightControlToolbarItemIdentifier)
             applyLeftSideWidth(self.model.lastLeftPanWidth, rightSideWidth: 0)
             applyLeftSideWidth(self.model.lastLeftPanWidth, rightSideWidth: 0)
+            cancelMeasureType()
         }
         }
     }
     }
     
     

+ 0 - 1
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift

@@ -1447,7 +1447,6 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
 //            self.rightSideViewController.view.isHidden = true
 //            self.rightSideViewController.view.isHidden = true
             self.rightSideViewController.isHidden = true
             self.rightSideViewController.isHidden = true
             self.closeRightPane()
             self.closeRightPane()
-            cancelMeasureType()
         }
         }
         let aType = annotationType
         let aType = annotationType
         if aType.isMarkup() || aType == .anchored || aType == .freeText || aType.isSquare() || aType == .link {
         if aType.isMarkup() || aType == .anchored || aType == .freeText || aType.isSquare() || aType == .link {