Browse Source

【BOTA】- 主菜单打开BOTA代码优化

liaoxiaoyue 1 năm trước cách đây
mục cha
commit
76e744a05f

+ 9 - 1
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift

@@ -93,7 +93,15 @@ class KMLeftSideViewController: NSViewController, KMThumbnailViewControllerDeleg
         }
     }
     
-    func refreshMethodType(newType:KMLeftMethodMode,show:Bool) {
+    func refreshMethodType(methodType:BotaType) {
+        let newType = KMLeftMethodMode()
+        var show = true
+        if self.type.methodType != methodType {
+            newType.methodType = .Annotation
+        }
+        if self.type.methodType == methodType {
+            show = false
+        }
         self.type = newType;
         self.refreshShowMethod()
         self.delegate?.controlStateChange?(self,show:show)