Selaa lähdekoodia

Merge branch 'develop' of git.kdan.cc:Mac_PDF/PDF_Office into develop

tangchao 1 vuosi sitten
vanhempi
commit
794a46e83c

+ 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()
+            }
         }
     }
 }