]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
macos: TunnelsList: set allowsEmptySelection after making initial selection
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 19 Mar 2019 02:25:38 +0000 (03:25 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Tue, 19 Mar 2019 04:13:27 +0000 (22:13 -0600)
Otherwise we never get the event that the selection changed, so we don't
wind up showing anything in the details pane.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift

index f922f615e86146455efe641d3bfe0672368bd23a..167aa0a66daf637b00ba56727b98cef0ff1de6bf 100644 (file)
@@ -19,7 +19,6 @@ class TunnelsListTableViewController: NSViewController {
         tableView.headerView = nil
         tableView.rowSizeStyle = .medium
         tableView.allowsMultipleSelection = true
-        tableView.allowsEmptySelection = false
         return tableView
     }()
 
@@ -84,6 +83,7 @@ class TunnelsListTableViewController: NSViewController {
         if !isSelected {
             delegate?.tunnelsListEmpty()
         }
+        tableView.allowsEmptySelection = false
 
         let scrollView = NSScrollView()
         scrollView.hasVerticalScroller = true