macOS: On adding the first tunnel, select it

Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
Roopesh Chander 2019-01-05 19:18:36 +05:30
parent cb778fe7e0
commit c72f7056b3
1 changed files with 3 additions and 0 deletions

View File

@ -229,6 +229,9 @@ class TunnelsListTableViewController: NSViewController {
extension TunnelsListTableViewController { extension TunnelsListTableViewController {
func tunnelAdded(at index: Int) { func tunnelAdded(at index: Int) {
tableView.insertRows(at: IndexSet(integer: index), withAnimation: .slideLeft) tableView.insertRows(at: IndexSet(integer: index), withAnimation: .slideLeft)
if tunnelsManager.numberOfTunnels() == 1 {
selectTunnel(at: 0)
}
} }
func tunnelModified(at index: Int) { func tunnelModified(at index: Int) {