|
@@ -447,6 +447,7 @@ import Cocoa
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(didShowFullScreenNotification), name: NSWindow.didShowFullScreenNotification, object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(didAddContentViewNotification), name: NSWindow.didAddContentViewNotification, object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(addAutoSaveEvent), name: AutoSaveManager.kTimeValueChangedNotificationName, object: nil)
|
|
|
+ NotificationCenter.default.addObserver(self, selector: #selector(didRemoveAnnotationNotification), name: NSNotification.Name.CPDFPageDidRemoveAnnotation, object: nil)
|
|
|
|
|
|
Task {
|
|
|
self.addAutoSaveEvent()
|
|
@@ -2456,6 +2457,18 @@ import Cocoa
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //!!!: - CPDFFreeTextAnnotation 空注释时会删除,删除时sdk内部删除的,只能接受通知来刷选UI【正常的注释删除会走两遍】
|
|
|
+ @objc func didRemoveAnnotationNotification(_ sender: Notification) {
|
|
|
+ guard let anno = sender.object as? CPDFAnnotation else {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if anno.page?.document != self.listView.document {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ self.leftSideViewController.annoList_refreshUIForDeleteAnnotations(annos: [anno], page: anno.page)
|
|
|
+ }
|
|
|
+
|
|
|
// MARK: Split View
|
|
|
|
|
|
func changePDFDocument(isChange: Bool, replaceBlock: @escaping (String) -> Void) {
|