Browse Source

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

tangchao 10 months ago
parent
commit
8f88474375

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/Print/KMPrintWindowController.swift

@@ -180,7 +180,7 @@ class KMPrintWindowController: KMBaseWindowController, NetServiceBrowserDelegate
     
     static func showNewPrintWindowControll(inputDocument: CPDFDocument?, inputType: DataNavigationViewButtonActionType = .Print, inputPageRange: KMPrintPageRange, printType: KMPrintModelType = .size) {
         //订阅
-        if !IAPProductsManager.default().isAvailableAllFunction(){
+        if !IAPProductsManager.default().isAvailableAllFunction() && printType != .size {
             KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
             return
         }

+ 11 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMGeneralAnnotationViewController.swift

@@ -406,7 +406,7 @@ let KMColorPickerViewHeight: CGFloat = 64
         }
 //        NotificationCenter.default.addObserver(self, selector: #selector(alignmentTypeNotification(_:)), name: "KMAnnotationAlignmentTypeNotification1", object: nil)
 //        NotificationCenter.default.addObserver(self, selector: #selector(loadingUIAndLocalization(_:)), name: "KMPreferenceDidChangeNotificationName", object: nil)
-//        NotificationCenter.default.addObserver(self, selector: #selector(annotationChangeNotification(_:)), name: CPDFListViewAnnotationsAttributeHasChangeNotification, object: nil)
+        NotificationCenter.default.addObserver(self, selector: #selector(annotationChangeNotification(_:)), name: NSNotification.Name(rawValue: "CPDFListViewAnnotationsAttributeHasChangeNotification"), object: nil)
     }
     
     override func viewDidLoad() {
@@ -2309,6 +2309,16 @@ let KMColorPickerViewHeight: CGFloat = 64
             updateViewColor()
         }
     }
+    
+    @objc func annotationChangeNotification(_ notification: NSNotification) {
+        if notification.object != nil {
+            let anno: [String : Any] = notification.object as! [String : Any]
+            let textAnno: CPDFAnnotation = anno["object"] as! CPDFAnnotation
+            if textAnno.isKind(of: CPDFTextAnnotation.self) {
+                textColorPickerView.setColor(textAnno.color)
+            }
+        }
+    }
 }
 
 class KMGeneralAnnotationColorButton: NSButton {