aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2019-01-05 19:18:36 +0530
committerRoopesh Chander <roop@roopc.net>2019-01-14 14:52:33 +0530
commitc72f7056b3487844f724312ef4abb7a2624b6cb6 (patch)
treefe69153131fc26c8cffd8599c52d2c7965a853cb /WireGuard
parentmacOS: Consolidate presenting of the import panel (diff)
downloadwireguard-apple-c72f7056b3487844f724312ef4abb7a2624b6cb6.tar.xz
wireguard-apple-c72f7056b3487844f724312ef4abb7a2624b6cb6.zip
macOS: On adding the first tunnel, select it
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift3
1 files changed, 3 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift
index 0937453e..7eee3453 100644
--- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift
+++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift
@@ -229,6 +229,9 @@ class TunnelsListTableViewController: NSViewController {
extension TunnelsListTableViewController {
func tunnelAdded(at index: Int) {
tableView.insertRows(at: IndexSet(integer: index), withAnimation: .slideLeft)
+ if tunnelsManager.numberOfTunnels() == 1 {
+ selectTunnel(at: 0)
+ }
}
func tunnelModified(at index: Int) {