Sfoglia il codice sorgente

[批量] - 添加背景,模版选择颜色还是文件

jiajie 1 anno fa
parent
commit
67287de4d4

+ 3 - 2
PDF Office/PDF Master/Class/PDFTools/Background/New/KMBackgroundWindowController.swift

@@ -13,7 +13,7 @@ class KMBackgroundWindowController: KMBaseWindowController {
     @IBOutlet weak var addBackgroundView: KMAddBackgroundView!
     
     var type: KMBackgroundManagerType = .use
-    
+    var currentType: Int = 0
     var operateCallBack: KMBackgroundWindowControllerOperateCallBack?
     
     override func windowDidLoad() {
@@ -21,8 +21,9 @@ class KMBackgroundWindowController: KMBaseWindowController {
         
         // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
         addBackgroundView.isHiddenBatchBtn = isBatch
-        addBackgroundView.pdfDocument = self.pdfDocument
         addBackgroundView.type = type
+        addBackgroundView.currentType = currentType
+        addBackgroundView.pdfDocument = self.pdfDocument
         addBackgroundView.cancelAction = { [unowned self] view in
             cancelAction?(self)
         }

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/Watermark/Controller/KMBatchOperateAddWatermarkViewController.swift

@@ -385,8 +385,8 @@ class KMBatchOperateAddWatermarkViewController: KMBatchOperateBaseViewController
         if isBackground {
             let controller = KMBackgroundWindowController(windowNibName: "KMBackgroundWindowController")
             controller.isBatch = isBatchOperation
+            controller.currentType = self.currentBackgroundType.rawValue
             controller.pdfDocument = cdocument
-            
             controller.cancelAction = { [unowned self] controller in
                 self.km_endSheet()
             }