macOS: When programmatically selecting a tunnel, also scroll if required

Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
Roopesh Chander 2019-02-22 18:18:51 +05:30
parent 98a967acc8
commit ce405f856e
1 changed files with 1 additions and 0 deletions

View File

@ -242,6 +242,7 @@ class TunnelsListTableViewController: NSViewController {
@discardableResult
private func selectTunnel(at index: Int) -> Bool {
if index < tunnelsManager.numberOfTunnels() {
tableView.scrollRowToVisible(index)
tableView.selectRowIndexes(IndexSet(integer: index), byExtendingSelection: false)
return true
}