Jelajahi Sumber

【多页签】设置中开启“启动时重新打开上一次文件”,重启APP前后,页签顺序和当前打开文档不一致

liujiajie 6 bulan lalu
induk
melakukan
3a5a94fcb7
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      PDF Office/PDF Master/AppDelegate.swift

+ 2 - 2
PDF Office/PDF Master/AppDelegate.swift

@@ -363,9 +363,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
     }
     
     func applicationWillTerminate(_ aNotification: Notification) {
-        if (NSApp.orderedDocuments.count > 0) {
+        if (NSDocumentController.shared.documents.count > 0) {
             var filepaths: [String] = []
-            for document in NSApp.orderedDocuments {
+            for document in NSDocumentController.shared.documents {
                 //                KMPrint(document.fileURL as Any)
                 if (document.fileURL?.path != nil) {
                     filepaths.append((document.fileURL?.path)!)