diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-08 20:33:20 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-08 20:33:20 +0200 |
commit | 61cb746df01897be84dadfd93b38a16624ffeb3a (patch) | |
tree | 2aed3847feaaee129f512a78acffb848d36d264f | |
parent | ui: do not allow removed items state changes to change tray state (diff) | |
download | wireguard-windows-61cb746df01897be84dadfd93b38a16624ffeb3a.tar.xz wireguard-windows-61cb746df01897be84dadfd93b38a16624ffeb3a.zip |
ui: don't allow ctrl+a on empty list to hide filler
-rw-r--r-- | ui/tunnelspage.go | 3 |
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))) |