Explorar o código

【左边栏】- 进入页面编辑模式工具栏状态修改

liaoxiaoyue hai 1 ano
pai
achega
c7568f3568

+ 2 - 12
PDF Office/PDF Office/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift

@@ -398,18 +398,8 @@ extension KMMainViewController: KMLeftSideViewControllerDelegate {
     }
     
     func enterEditMode(_ obj: KMLeftSideViewController) {
-        if(self.toolbarController.toolbarType != .Page) {
-            self.toolbarController.toolbarType = .Page
-            if (hasEnterPageEdit()) {
-                self.exitPageEdit()
-            } else {
-                self.enterPageEdit()
-            }
-        } else {
-            if (hasEnterPageEdit()) {
-                self.exitPageEdit()
-            }
-        }
+        let item : KMToolBoxItem = (self.toolbarController.mainToolBarView?.toolbarItemFindItemIdentifiers(value: KMDocumentPageToolbarItemIdentifier))!
+        self.toolbarController.mainToolBarView?.delegate?.toolbarViewController?(self.toolbarController.mainToolBarView!, clickMode: .Page, toolbar: item)
     }
     
     func searchAction(searchString: String,isCase:Bool) {