mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-28 08:13:17 +03:00
GH-296 Use == for tools and make a property private
This commit is contained in:
parent
05178e5214
commit
f326ddf70a
@ -36,6 +36,8 @@ class Workspace: NSView, WorkspaceBarDelegate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fileprivate var tools = [WorkspaceTool]()
|
||||||
|
|
||||||
required init?(coder: NSCoder) {
|
required init?(coder: NSCoder) {
|
||||||
fatalError("init(coder:) has not been implemented")
|
fatalError("init(coder:) has not been implemented")
|
||||||
}
|
}
|
||||||
@ -43,7 +45,6 @@ class Workspace: NSView, WorkspaceBarDelegate {
|
|||||||
// MARK: - API
|
// MARK: - API
|
||||||
let mainView: NSView
|
let mainView: NSView
|
||||||
let bars: [WorkspaceBarLocation: WorkspaceBar]
|
let bars: [WorkspaceBarLocation: WorkspaceBar]
|
||||||
var tools = [WorkspaceTool]()
|
|
||||||
let config: Config
|
let config: Config
|
||||||
|
|
||||||
weak var delegate: WorkspaceDelegate?
|
weak var delegate: WorkspaceDelegate?
|
||||||
|
@ -532,7 +532,7 @@ extension WorkspaceBar {
|
|||||||
|
|
||||||
if self.isOpen {
|
if self.isOpen {
|
||||||
let curTool = self.selectedTool!
|
let curTool = self.selectedTool!
|
||||||
if curTool === tool {
|
if curTool == tool {
|
||||||
// In this case, curTool.isSelected is already set to false in WorkspaceTool.toggle()
|
// In this case, curTool.isSelected is already set to false in WorkspaceTool.toggle()
|
||||||
self.selectedTool = nil
|
self.selectedTool = nil
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user