From: Roopesh Chander Date: Fri, 22 Feb 2019 12:48:51 +0000 (+0530) Subject: macOS: When programmatically selecting a tunnel, also scroll if required X-Git-Tag: 0.0.20190319-1~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce405f856e13cd668eb550d3a7acafacf46d3732;p=thirdparty%2Fwireguard-apple.git macOS: When programmatically selecting a tunnel, also scroll if required Signed-off-by: Roopesh Chander --- 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 }