mirror of
https://github.com/passepartoutvpn/wireguard-apple.git
synced 2025-02-12 10:52:03 +00:00
macOS: When programmatically selecting a tunnel, also scroll if required
This commit is contained in:
parent
100fc4b855
commit
255645bdf0
@ -242,6 +242,7 @@ class TunnelsListTableViewController: NSViewController {
|
|||||||
@discardableResult
|
@discardableResult
|
||||||
private func selectTunnel(at index: Int) -> Bool {
|
private func selectTunnel(at index: Int) -> Bool {
|
||||||
if index < tunnelsManager.numberOfTunnels() {
|
if index < tunnelsManager.numberOfTunnels() {
|
||||||
|
tableView.scrollRowToVisible(index)
|
||||||
tableView.selectRowIndexes(IndexSet(integer: index), byExtendingSelection: false)
|
tableView.selectRowIndexes(IndexSet(integer: index), byExtendingSelection: false)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user