Преглед на файлове

【PDFView】- 阅读通用交互补充

liaoxiaoyue преди 1 година
родител
ревизия
6e2d385be7

+ 3 - 1
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/Annotation/KMAnnotationViewController.swift

@@ -162,12 +162,14 @@ class KMAnnotationViewController: KMSideViewController {
     //MARK: Accessors
     //MARK: Accessors
     
     
     @IBAction func tableViewDoubleAction(_ sender: Any) {
     @IBAction func tableViewDoubleAction(_ sender: Any) {
+        if self.tableView.selectedRowIndexes.count > 1 {
+            return
+        }
         let selectedRow = self.tableView.selectedRow
         let selectedRow = self.tableView.selectedRow
         if selectedRow >= 0 && selectedRow < self.annotations.count {
         if selectedRow >= 0 && selectedRow < self.annotations.count {
             let annotation = self.annotations[selectedRow]
             let annotation = self.annotations[selectedRow]
             if (annotation as AnyObject).isKind(of: CPDFAnnotation.self) {
             if (annotation as AnyObject).isKind(of: CPDFAnnotation.self) {
                 self.listView.go(to: (annotation as! CPDFAnnotation).bounds, on: (annotation as! CPDFAnnotation).page, animated: true)
                 self.listView.go(to: (annotation as! CPDFAnnotation).bounds, on: (annotation as! CPDFAnnotation).page, animated: true)
-//                self.mainWindowController.listView.seta
             }
             }
         }
         }
     }
     }

+ 1 - 3
PDF Office/PDF Office/Class/PDFWindowController/Toolbar/KMToolbarViewController.swift

@@ -74,7 +74,6 @@ class KMToolbarViewController: NSViewController, NSTextFieldDelegate {
     var toolbar : KMToolbar!
     var toolbar : KMToolbar!
     var toolbarType : KMToolbarViewType = KMToolbarViewType.None
     var toolbarType : KMToolbarViewType = KMToolbarViewType.None
     var toolbarItems : [String : Any] = [:]
     var toolbarItems : [String : Any] = [:]
-    var isShow : Bool = false
     @IBOutlet weak  var mainWindowController : MainWindowController!
     @IBOutlet weak  var mainWindowController : MainWindowController!
     open weak var delegate: KMToolbarViewControllerDelegate?
     open weak var delegate: KMToolbarViewControllerDelegate?
     @IBOutlet var zoomButton: NSPopUpButton!
     @IBOutlet var zoomButton: NSPopUpButton!
@@ -140,8 +139,7 @@ class KMToolbarViewController: NSViewController, NSTextFieldDelegate {
     }
     }
     
     
     @IBAction func showPDFLayoutMode(item: KMToolBoxItem) {
     @IBAction func showPDFLayoutMode(item: KMToolBoxItem) {
-        self.isShow = !isShow
-        self.delegate?.showPDFLayoutModeAction?(show: isShow)
+        self.delegate?.showPDFLayoutModeAction?(show: true)
     }
     }
     
     
     @objc func cropMenuAction(item: KMToolBoxItem) {
     @objc func cropMenuAction(item: KMToolBoxItem) {

+ 5 - 1
PDF Office/PDF Office/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift

@@ -1367,7 +1367,11 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
     }
     }
     
     
     func toolbarViewController(_ viewController: KMToolbarViewController, zoomSting: String) {
     func toolbarViewController(_ viewController: KMToolbarViewController, zoomSting: String) {
-        self.listView.scaleFactor = CGFloat((NSString(string: zoomSting)).floatValue / 100.0)
+        var scale = CGFloat((NSString(string: zoomSting)).floatValue / 100.0)
+        if scale > 100 {
+            scale = 100
+        }
+        self.listView.scaleFactor = scale
         viewController.zoomTextField.stringValue =  "\(Int(self.listView.scaleFactor*100))%"
         viewController.zoomTextField.stringValue =  "\(Int(self.listView.scaleFactor*100))%"
     }
     }
     
     

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

@@ -233,7 +233,8 @@ extension KMMainViewController: KMToolbarControllerDelegate {
     }
     }
     
     
     func showPDFLayoutModeAction(show: Bool) {
     func showPDFLayoutModeAction(show: Bool) {
-        listView.hideNotes = !show
+        self.listView.annotationType = .unkown
+        listView.hideNotes = !listView.hideNotes
     }
     }
     
     
     func toolbarViewController(_ viewController: KMToolbarViewController, rightPanel toolbarItem: KMToolBoxItem) {
     func toolbarViewController(_ viewController: KMToolbarViewController, rightPanel toolbarItem: KMToolBoxItem) {