Browse Source

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

tangchao 10 months ago
parent
commit
0b3a4a679d

+ 10 - 2
PDF Office/PDF Master/Class/PDFTools/Redact/View/KMRedactPDFView.swift

@@ -123,8 +123,16 @@ private let KMPDFViewRedactAnnotationAcross = "KMPDFViewRedactAnnotationAcross"
         return menu
     }
     
-    @objc func deleteAnnotation() {
-        
+    @objc func deleteAnnotation(_ sender: NSMenuItem?) {
+        if let annotation = sender?.representedObject as? CPDFRedactAnnotation {
+            removeAnnotation(annotation: annotation)
+        }
+    }
+    
+    func removeAnnotation(annotation: CPDFAnnotation) {
+        var annos = NSMutableArray()
+        annos.add(annotation)
+        removeAccosAnnotations(annos)
     }
     
     @objc func setPropertiesDefault(_ sender: NSMenuItem?) {