Bladeren bron

【Home】合并选中多个文档,内存会突然飙升(已修复)

tangchao 1 jaar geleden
bovenliggende
commit
82c166bc14

+ 1 - 1
PDF Office/PDF Master/Class/Home/Category/NSImage+QuickLook.swift

@@ -8,7 +8,7 @@
 import AppKit
 import QuickLook
 
-extension NSImage {
+@objc extension NSImage {
     static func previewForFile(path fileURL: URL, ofSize size: CGSize, asIcon: Bool) -> NSImage? {
         
         let dict = [

+ 2 - 1
PDF Office/PDF Master/Class/Merge/OCPart/KMPDFEditAppendWindow.m

@@ -838,7 +838,8 @@ static KMPDFEditAppendWindow *windowController = nil;
     cell.fileNameLabel.stringValue = [fileAttribute.filePath lastPathComponent];
     cell.pageNumberLabel.stringValue = [NSString stringWithFormat:@"%ld %@",pdf.pageCount,NSLocalizedString(@"Pages", nil)];;
     
-    cell.iconImageView.image =  [[pdf pageAtIndex:0] thumbnailWithSize:60*2 forBox:kPDFDisplayBoxCropBox];
+//    cell.iconImageView.image = [[pdf pageAtIndex:0] thumbnailWithSize:60*2 forBox:kPDFDisplayBoxCropBox];
+    cell.iconImageView.image = [NSImage previewForFileWithPath:pdf.documentURL ofSize:NSMakeSize(120, 120) asIcon:YES];
     return cell;
 }