瀏覽代碼

【fix】【注释】App Store & DMG,添加注释后,点击注释列表按钮高概率崩溃

tangchao 6 月之前
父節點
當前提交
6daf867a49

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

@@ -264,11 +264,11 @@ extension KMNoteTableViewCell {
                 if (markup.markupType() == .highlight) {
                     attributeStr.addAttribute(.backgroundColor, value: noteColor as Any, range: NSMakeRange(0, contentString.count))
                 } else if (markup.markupType() == .strikeOut) {
-                    attributeStr.addAttribute(.strikethroughStyle, value: NSUnderlineStyle.single.rawValue, range: NSMakeRange(0, noteString.count))
-                    attributeStr.addAttribute(.strikethroughColor, value: noteColor as Any, range: NSMakeRange(0, noteString.count))
+                    attributeStr.addAttribute(.strikethroughStyle, value: NSUnderlineStyle.single.rawValue, range: NSMakeRange(0, contentString.count))
+                    attributeStr.addAttribute(.strikethroughColor, value: noteColor as Any, range: NSMakeRange(0, contentString.count))
                 } else if (markup.markupType() == .underline) {
-                    attributeStr.addAttribute(.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: NSMakeRange(0, noteString.count))
-                    attributeStr.addAttribute(.underlineColor, value: noteColor as Any, range: NSMakeRange(0, noteString.count))
+                    attributeStr.addAttribute(.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: NSMakeRange(0, contentString.count))
+                    attributeStr.addAttribute(.underlineColor, value: noteColor as Any, range: NSMakeRange(0, contentString.count))
                 }
                 self.annotationContentLabel.attributedStringValue = attributeStr