Browse Source

【综合】批量转档&压缩完善

niehaoyu 9 months ago
parent
commit
a412942975

+ 6 - 2
PDF Office/PDF Master/Class/Batch/WindowController/Base/KMBatchOperateBaseViewController.swift

@@ -136,9 +136,13 @@ class KMBatchOperateBaseViewController: NSViewController, KMBatchOperateProtocol
     func operationWithFile(_ file: KMBatchOperateFile) -> KMBatchOperation {
         var operation: KMBatchOperation?
         if self.operateType == .Convert {
-            return KMBatchConvertOperation(file: file, convertType: self.convertType!)
+            let batchOperate = KMBatchConvertOperation(file: file, convertType: self.convertType!)
+            batchOperate.viewController = self
+            return batchOperate
         } else if self.operateType == .Compress {
-            return KMCompressOperation(file: file, compressValue: 60)
+            let batchOperate = KMCompressOperation(file: file, compressValue: 60)
+            batchOperate.viewController = self
+            return batchOperate
         } else if self.operateType == .AddPassword {
             // handle AddPassword operation
         } else if self.operateType == .RemovePassword {