|
@@ -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 { // 是否为搜索模块
|