Browse Source

综合 - 修复视图界面Crash

wanjun 1 year ago
parent
commit
664012d763

+ 5 - 3
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/ViewPanel/KMPDFViewPanelSetViewController.swift

@@ -242,9 +242,11 @@ class KMPDFViewPanelSetViewController: NSViewController {
     }
     
     @objc func displayModeChangedNotification(_ notification: Notification) -> Void {
-        let pdfview = notification.object as! CPDFListView
-        if(pdfview.document == self.listView?.document) {
-            self.reloadListViewModel()
+        if notification.object is CPDFListView {
+            let pdfview = notification.object as! CPDFListView
+            if(pdfview.document == self.listView?.document) {
+                self.reloadListViewModel()
+            }
         }
     }
 }