Jelajahi Sumber

【综合】大纲列表空状态偶发不显示(已修复)

tangchao 1 tahun lalu
induk
melakukan
baa97722ff

+ 0 - 16
PDF Office/PDF Master.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -292,22 +292,6 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "B32D857B-3059-44B0-A24F-2AF4265B3FF1"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "PDF Master/Class/Home/ViewController/KMHomeViewController+UI.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "244"
-            endingLineNumber = "244"
-            landmarkName = "_showConvertWindow(type:url:password:)"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent

+ 12 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift

@@ -879,6 +879,10 @@ class KMLeftSideViewController: KMSideViewController {
         let emptyVcSize =  self.leftSideEmptyVC.emptyOutlineView.frame.size
         
         self.leftSideEmptyVC.emptyOutlineView.frame = NSMakeRect((view.frame.size.width-emptyVcSize.width)/2.0,(view.frame.size.height-emptyVcSize.height)/2.0, emptyVcSize.width, emptyVcSize.height);
+        
+        DispatchQueue.main.async {
+            self.tocOutlineView.reloadData()
+        }
     }
     
     override func requiresAlternateButton(forView aview: NSView?) -> Bool {
@@ -3097,10 +3101,17 @@ extension KMLeftSideViewController: NSOutlineViewDelegate, NSOutlineViewDataSour
             if item == nil { // 第一层
                 // 获取根
                 guard let outline = self.listView.document.outlineRoot() else {
+                    let view = self.tocOutlineView.enclosingScrollView!
+                    let emptyVcSize =  self.leftSideEmptyVC.emptyOutlineView.frame.size
+//
+                    self.leftSideEmptyVC.emptyOutlineView.frame = NSMakeRect((view.frame.size.width-emptyVcSize.width)/2.0,(view.frame.size.height-emptyVcSize.height)/2.0, emptyVcSize.width, emptyVcSize.height)
+                    self.leftSideEmptyVC.emptyOutlineView.autoresizingMask = [.minXMargin, .maxXMargin, .minYMargin, .maxYMargin]
+                    self.tocOutlineView.enclosingScrollView?.documentView?.addSubview(self.leftSideEmptyVC.emptyOutlineView)
+                    self.leftSideEmptyVC.deleteOutlineBtn.isEnabled = false
                     return 0
                 }
                 if outline.numberOfChildren == 0 {
-                    return 0
+//                    return 0
                 }
                 
                 if self.isSearchOutlineMode { // 是否为搜索模块