Sfoglia il codice sorgente

【fix】 【注释】删除所有注释后,页面上还显示文本注释的背景色

tangchao 4 mesi fa
parent
commit
20e7c81a91

+ 3 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Note.swift

@@ -635,6 +635,9 @@ extension KMLeftSideViewController {
                 for model in self.annoListModel?.datas ?? [] {
                     for item in model.items {
                         if let anno = item.anno {
+                            if let data = anno as? CPDFFreeTextAnnotation {
+                                self.listView?.commitEditAnnotationFreeText(data)
+                            }
                             self.listView?.remove(anno)
                         }
                     }

+ 3 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift

@@ -2874,6 +2874,9 @@ extension KMLeftSideViewController: KMCustomOutlineViewDelegate, KMCustomOutline
                 guard let anno = item as? CPDFAnnotation else {
                     continue
                 }
+                if let data = anno as? CPDFFreeTextAnnotation {
+                    self.listView?.commitEditAnnotationFreeText(data)
+                }
                 self.listView?.remove(anno)
             }
             for item in items {