Pārlūkot izejas kodu

【编辑工具】合并文件 SDKcrash 暂时屏蔽大纲插入

lizhe 10 mēneši atpakaļ
vecāks
revīzija
86b65c7888

+ 13 - 9
PDF Office/PDF Master/Class/PDFTools/Merge/MergeNew/KMMergeWindowController.swift

@@ -217,15 +217,19 @@ extension KMMergeWindowController {
             if self.oldPDFDocument.outlineRoot() == nil {
                 self.oldPDFDocument.setNewOutlineRoot()
             }
-//            if allPage {
-                var insertIndex = 0
-                for i in 0..<rootPDFOutlineArray.count {
-                    let rootOutline = rootPDFOutlineArray[i]
-                    for j in 0..<rootOutline.numberOfChildren {
-                        self.oldPDFDocument.outlineRoot().insertChild(rootOutline.child(at: j)!, at: UInt(insertIndex))
-                        insertIndex = insertIndex + 1
-                    }
-                }
+            if allPage {
+//                var insertIndex = 0
+//                for i in 0..<rootPDFOutlineArray.count {
+//                    let rootOutline = rootPDFOutlineArray[i]
+//                    for j in 0..<rootOutline.numberOfChildren {
+//                        let outline = rootOutline.child(at: j)
+//                        if outline != nil {
+//                            self.oldPDFDocument.outlineRoot().insertChild(outline!, at: UInt(insertIndex))
+//                            insertIndex = insertIndex + 1
+//                        }
+//                    }
+//                }
+            }
                 
                 self.handleReDraw()