Explorar el Código

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

liujiajie hace 6 meses
padre
commit
3a5a94fcb7
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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)!)