Remove code setting the sidebarViewController on SidebarOutlineView, since it doesn’t use it.
This commit is contained in:
parent
fc138990ff
commit
1f0123db36
@ -12,19 +12,9 @@ import RSTree
|
|||||||
|
|
||||||
class SidebarOutlineView : NSOutlineView {
|
class SidebarOutlineView : NSOutlineView {
|
||||||
|
|
||||||
weak var sidebarViewController: SidebarViewController?
|
|
||||||
@IBOutlet var keyboardDelegate: KeyboardDelegate!
|
@IBOutlet var keyboardDelegate: KeyboardDelegate!
|
||||||
|
|
||||||
//MARK: NSResponder
|
// MARK: NSTableView
|
||||||
|
|
||||||
override func keyDown(with event: NSEvent) {
|
|
||||||
|
|
||||||
if keyboardDelegate.keydown(event, in: self) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
super.keyDown(with: event)
|
|
||||||
}
|
|
||||||
|
|
||||||
override func frameOfCell(atColumn column: Int, row: Int) -> NSRect {
|
override func frameOfCell(atColumn column: Int, row: Int) -> NSRect {
|
||||||
|
|
||||||
@ -45,6 +35,8 @@ class SidebarOutlineView : NSOutlineView {
|
|||||||
return frame
|
return frame
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: NSView
|
||||||
|
|
||||||
override func viewWillStartLiveResize() {
|
override func viewWillStartLiveResize() {
|
||||||
|
|
||||||
if let scrollView = self.enclosingScrollView {
|
if let scrollView = self.enclosingScrollView {
|
||||||
@ -60,4 +52,15 @@ class SidebarOutlineView : NSOutlineView {
|
|||||||
}
|
}
|
||||||
super.viewDidEndLiveResize()
|
super.viewDidEndLiveResize()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: NSResponder
|
||||||
|
|
||||||
|
override func keyDown(with event: NSEvent) {
|
||||||
|
|
||||||
|
if keyboardDelegate.keydown(event, in: self) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
super.keyDown(with: event)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,6 @@ import RSCore
|
|||||||
|
|
||||||
sidebarCellAppearance = SidebarCellAppearance(theme: appDelegate.currentTheme, fontSize: AppDefaults.shared.sidebarFontSize)
|
sidebarCellAppearance = SidebarCellAppearance(theme: appDelegate.currentTheme, fontSize: AppDefaults.shared.sidebarFontSize)
|
||||||
|
|
||||||
outlineView.sidebarViewController = self
|
|
||||||
outlineView.setDraggingSourceOperationMask(.move, forLocal: true)
|
outlineView.setDraggingSourceOperationMask(.move, forLocal: true)
|
||||||
outlineView.setDraggingSourceOperationMask(.copy, forLocal: false)
|
outlineView.setDraggingSourceOperationMask(.copy, forLocal: false)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user