Browse Source

多页签 - 修复开启多个文档后,在文档中加入注释,直接关闭,不会走保存逻辑

wanjun 1 year ago
parent
commit
ebeb75c4d1
1 changed files with 2 additions and 1 deletions
  1. 2 1
      PDF Office/PDF Master/Class/Document/KMMainDocument.swift

+ 2 - 1
PDF Office/PDF Master/Class/Document/KMMainDocument.swift

@@ -199,7 +199,8 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
         NotificationCenter.default.addObserver(self, selector: #selector(pdfChangedNotification(_:)), name: NSNotification.Name.init(rawValue: "CPDFListViewAnnotationsAttributeHasChangeNotification"), object: nil)
 //        NotificationCenter.default.addObserver(self, selector: #selector(pdfChangedNotification(_:)), name: NSNotification.Name.init(rawValue: "CPDFViewDocumentChangedNotification"), object: nil)
 //        NotificationCenter.default.addObserver(self, selector: #selector(pdfChangedNotification(_:)), name: NSNotification.Name.init(rawValue: "CPDFViewPageChangedNotification"), object: nil)
-
+        NotificationCenter.default.addObserver(self, selector: #selector(pdfChangedNotification(_:)), name: NSNotification.Name.init(rawValue: "CPDFListViewDidAddAnnotationNotification"), object: nil)
+        NotificationCenter.default.addObserver(self, selector: #selector(pdfChangedNotification(_:)), name: NSNotification.Name.init(rawValue: "CPDFListViewDidRemoveAnnotationNotification"), object: nil)
     }
 
     override init?(baseTabContents baseContents: CTTabContents?) {