Made sure an item in the timeline is selected when getting focus - Issue #558
This commit is contained in:
parent
08110044ea
commit
6fa019702d
|
@ -21,6 +21,16 @@ class TimelineTableView: NSTableView {
|
|||
super.keyDown(with: event)
|
||||
}
|
||||
|
||||
override func becomeFirstResponder() -> Bool {
|
||||
if super.becomeFirstResponder() {
|
||||
if selectedRow == -1 && numberOfRows > 0 {
|
||||
rs_selectRowAndScrollToVisible(0)
|
||||
}
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// MARK: - NSView
|
||||
|
||||
override func viewWillStartLiveResize() {
|
||||
|
|
|
@ -375,9 +375,6 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner {
|
|||
}
|
||||
|
||||
window.makeFirstResponderUnlessDescendantIsFirstResponder(tableView)
|
||||
if !hasAtLeastOneSelectedArticle && articles.count > 0 {
|
||||
tableView.rs_selectRowAndScrollToVisible(0)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Notifications
|
||||
|
|
Loading…
Reference in New Issue