diff options
author | 2019-02-22 18:18:51 +0530 | |
---|---|---|
committer | 2019-02-22 18:18:53 +0530 | |
commit | ce405f856e13cd668eb550d3a7acafacf46d3732 (patch) | |
tree | 90cabfd3140ba73a5e4819dfbc7d2e888081e446 /WireGuard/WireGuard/UI | |
parent | macOS: Replace NSSegmentedControl with NSPopUpButton and NSButton (diff) | |
download | wireguard-apple-ce405f856e13cd668eb550d3a7acafacf46d3732.tar.xz wireguard-apple-ce405f856e13cd668eb550d3a7acafacf46d3732.zip |
macOS: When programmatically selecting a tunnel, also scroll if required
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r-- | WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift index 69802f6..3a29840 100644 --- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift +++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift @@ -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 } |