From 255645bdf0a92b029d288f98cefce253ee2ebc34 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Fri, 22 Feb 2019 18:18:51 +0530 Subject: [PATCH] macOS: When programmatically selecting a tunnel, also scroll if required --- .../UI/macOS/ViewController/TunnelsListTableViewController.swift | 1 + 1 file changed, 1 insertion(+) 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 }