Kaynağa Gözat

【APPCenter】Crash编号:78 -- 修复

lizhe 10 ay önce
ebeveyn
işleme
37a56b2069

+ 3 - 3
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/FormProperties/KMAnnotationButtonWidgetAppearanceViewController.swift

@@ -348,7 +348,7 @@ import Cocoa
 
     @IBAction func textColorPickerViewAction(_ sender: Any) {
         if self.annotationFreeText == nil {
-            var fieldString = annotation!.fieldName
+            var fieldString = annotation?.fieldName
             if annotation?.controlType() == .radioButtonControl,
                #available(macOS 10.13, *) {
                 fieldString = annotation!.buttonWidgetStateString
@@ -367,9 +367,9 @@ import Cocoa
         
         let userDefaults = UserDefaults.standard
         if formMode == .radioButton {
-            userDefaults.safe_setColor(textColorPickerView.color!, forKey: SKAnnotationRadioButtonWidgetFontColorKey)
+            userDefaults.safe_setColor(textColorPickerView.color, forKey: SKAnnotationRadioButtonWidgetFontColorKey)
         } else if formMode == .checkBox {
-            userDefaults.safe_setColor(textColorPickerView.color!, forKey: SKAnnotationCheckBoxWidgetFontColorKey)
+            userDefaults.safe_setColor(textColorPickerView.color, forKey: SKAnnotationCheckBoxWidgetFontColorKey)
         }
         self.annotationFreeText?.fontColor = self.textColorPickerView.color
         updateAnnotation()