aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-05-08 20:33:20 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-05-08 20:33:20 +0200
commit61cb746df01897be84dadfd93b38a16624ffeb3a (patch)
tree2aed3847feaaee129f512a78acffb848d36d264f /ui
parentui: do not allow removed items state changes to change tray state (diff)
downloadwireguard-windows-61cb746df01897be84dadfd93b38a16624ffeb3a.tar.xz
wireguard-windows-61cb746df01897be84dadfd93b38a16624ffeb3a.zip
ui: don't allow ctrl+a on empty list to hide filler
Diffstat (limited to 'ui')
-rw-r--r--ui/tunnelspage.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/tunnelspage.go b/ui/tunnelspage.go
index 4df9938b..addaaf25 100644
--- a/ui/tunnelspage.go
+++ b/ui/tunnelspage.go
@@ -559,6 +559,9 @@ func (tp *TunnelsPage) onTunnelsChanged() {
}
func (tp *TunnelsPage) onSelectedTunnelsChanged() {
+ if tp.listView.model.RowCount() == 0 {
+ return
+ }
indices := tp.listView.SelectedIndexes()
if tp.swapFiller(len(indices) > 1) {
tp.fillerButton.SetText(fmt.Sprintf("Delete %d tunnels", len(indices)))