diff options
author | 2019-01-05 19:18:36 +0530 | |
---|---|---|
committer | 2019-01-14 14:52:33 +0530 | |
commit | c72f7056b3487844f724312ef4abb7a2624b6cb6 (patch) | |
tree | fe69153131fc26c8cffd8599c52d2c7965a853cb /WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift | |
parent | macOS: Consolidate presenting of the import panel (diff) | |
download | wireguard-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.swift | 3 |
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 0937453..7eee345 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) { |