فهرست منبع

【综合】【超链接】工具-超链接,输入中文-点击前往,必现崩溃(已修复)

tangchao 10 ماه پیش
والد
کامیت
47fc0b037f

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/Merge/View/KMPDFThumbnialPageView.swift

@@ -103,7 +103,7 @@ class KMPDFThumbnialPageLayer: CATiledLayer {
 //                ctx.restoreGState();
 //                self.contents = bitmap?.cgImage
 //            } else {
-            KMPrint("km_log_drawEdit \(self.isThumb) \(self.page)")
+//            KMPrint("km_log_drawEdit \(self.isThumb) \(self.page)")
 //            km_synchronized(self.page!.document) {
                 self.page!.drawEdit(with: .cropBox, to: ctx)
 //            }

+ 6 - 2
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationSelectLinkViewController.swift

@@ -186,7 +186,9 @@ enum KMAnnotationLinkType: UInt {
         inputPageTextField.layer?.cornerRadius = 1.0
         inputUrlTextField.layer?.cornerRadius = 1.0
 
-        inputUrlTextField.inputContext?.allowedInputSourceLocales = [NSAllRomanInputSourcesLocaleIdentifier]
+//        inputUrlTextField.inputContext?.allowedInputSourceLocales = [NSAllRomanInputSourcesLocaleIdentifier]
+        let cell = self.inputUrlTextField.cell as? NSTextFieldCell
+        cell?.allowedInputSourceLocales = [NSAllRomanInputSourcesLocaleIdentifier]
 
         if let annotationURL = annotation?.url() {
             var urlString = annotationURL.fileURL.absoluteString
@@ -528,7 +530,9 @@ enum KMAnnotationLinkType: UInt {
             pdfview!.needsDisplay = true
 
             if let url = (pdfview?.activeAnnotation as! CPDFLinkAnnotation).url() {
-                NSWorkspace.shared.open(URL(string: url)!)
+                if let data = URL(string: url) {
+                    NSWorkspace.shared.open(data)
+                }
             }
 
         case .email: