mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-26 23:36:08 +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) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
@ -43,7 +45,6 @@ class Workspace: NSView, WorkspaceBarDelegate {
|
||||
// MARK: - API
|
||||
let mainView: NSView
|
||||
let bars: [WorkspaceBarLocation: WorkspaceBar]
|
||||
var tools = [WorkspaceTool]()
|
||||
let config: Config
|
||||
|
||||
weak var delegate: WorkspaceDelegate?
|
||||
|
@ -532,7 +532,7 @@ extension WorkspaceBar {
|
||||
|
||||
if self.isOpen {
|
||||
let curTool = self.selectedTool!
|
||||
if curTool === tool {
|
||||
if curTool == tool {
|
||||
// In this case, curTool.isSelected is already set to false in WorkspaceTool.toggle()
|
||||
self.selectedTool = nil
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user