macOS: On adding the first tunnel, select it

This commit is contained in:
Roopesh Chander 2019-01-05 19:18:36 +05:30
parent 6b587b4a11
commit ab077422d8
1 changed files with 3 additions and 0 deletions

View File

@ -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) {