Переглянути джерело

【fix】【注释列表】筛选时,有一个type不显示,点击clear后会显示

tangchao 6 місяців тому
батько
коміт
a2842c6e03

+ 4 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteTypeCollectionViewItem.swift

@@ -207,6 +207,8 @@ class KMNoteTypeCollectionViewItem: NSCollectionViewItem {
 //                let iv = KMNoteTypeImageView()
 //                let image = iv.noteTypeImage(withType: self.typeString, color: .white)
                 self.typeButton.image = NSImage(named: "KMImageNameFilterSquigglySel")
+            } else {
+                self.typeButton.image = nil
             }
             self.typeButton.layer?.backgroundColor = KMAppearance.KMColor_Interactive_A0().cgColor
         } else {
@@ -251,6 +253,8 @@ class KMNoteTypeCollectionViewItem: NSCollectionViewItem {
 //                let image = iv.noteTypeImage(withType: self.typeString, color: .lightGray)
 //                self.typeButton.image = image
                 self.typeButton.image = NSImage(named: "KMImageNameFilterSquiggly")
+            } else {
+                self.typeButton.image = nil
             }
             self.typeButton.layer?.backgroundColor = .clear
         }