Browse Source

Merge branch 'develop_PDFReaderProNew' into dev_toolbar

tangchao 9 months ago
parent
commit
4fada46d53

+ 4 - 4
PDF Office/PDF Master/Class/Common/Category/NSResponder+KMExtension.swift

@@ -63,10 +63,10 @@ extension NSResponder: KMWindowSheetProtocol {
             self._log("窗口弹起失败, 当前窗口为空.", needAssert: false)
             return false
         }
-        if let data = km_win.attachedSheet {
-            self._log("窗口弹起失败, 当前窗口已弹起其他窗口 \([data]).", needAssert: false)
-            return false
-        }
+//        if let data = km_win.attachedSheet {
+//            self._log("窗口弹起失败, 当前窗口已弹起其他窗口 \([data]).", needAssert: false)
+//            return false
+//        }
         return true
     }
     

+ 6 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/AppKitCategories/CPDFListEditAnnotationViewController.swift

@@ -140,6 +140,12 @@ class CPDFListEditAnnotationViewController: NSViewController, NSTextViewDelegate
         
         self.contentLabel?.stringValue = content
         self.contentTextView?.delegate = self
+        
+        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now()+0.15) {
+            self.view.window?.makeFirstResponder(self.contentTextView)
+            
+            self.contentTextView?.string = self.annotation.contents ?? ""
+        }
     }
     
     func undoManager(for view: NSTextView) -> UndoManager? {

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

@@ -223,7 +223,10 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
             [self doFormWithEvent:theEvent];
         } else {
             [self doDragAddAnnotationWithEvent:theEvent];
-            [super mouseDown:theEvent];
+            if (self.annotationType == CAnnotationTypeStamp ||
+                self.annotationType == CAnnotationTypeSignSignature) {
+                [super mouseDown:theEvent];
+            }
         }
     } else if ([self isSupportSelectAnnotation] && (area & CPDFImageArea) && CAnnotationTypeUnkown == self.annotationType) {
         [self updateActiveAnnotations:@[]];