Browse Source

【综合】 【加密】拥有权限密码的文档不能编辑,架上点击页面编辑,弹出输入密码框(已修复)

tangchao 10 months ago
parent
commit
dda92ff37c

+ 4 - 2
PDF Office/PDF Master/Class/Common/Base/KMBaseWindowController.swift

@@ -72,8 +72,10 @@ extension KMBaseWindowController {
 
         // 判断是否为加密文档
         if document.isLocked == false {
-            completion(true, "")
-            return
+            if type == .open {
+                completion(true, "")
+                return
+            }
         }
         
         if document.isLocked == false && (document.allowsCopying && document.allowsPrinting) {

+ 3 - 0
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift

@@ -3815,6 +3815,9 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
                 self.exitDigitalSign()
             }
         }
+        if item.itemIdentifier != KMDocumentViewDisplayToolbarItemIdentifier {
+            self.toolbarController.findItem(KMDocumentViewDisplayToolbarItemIdentifier)?.isSelected = false
+        }
         
         if(type != .Form) {
             self.removeFromAlertView()