aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-08-25 01:59:12 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-08-25 01:59:12 +0200
commit629db8a1b761d3fe83bd74b93348446eb2cdbcf4 (patch)
tree02f697d899476258f604042249e1f73f07e156af /ui
parentversion: use upstream RtlGetVersion (diff)
downloadwireguard-windows-629db8a1b761d3fe83bd74b93348446eb2cdbcf4.tar.xz
wireguard-windows-629db8a1b761d3fe83bd74b93348446eb2cdbcf4.zip
ui: when check error, reparse text
Sometimes walk misfires check events. For example, when pressing enter in the title box. This works around the consequences.
Diffstat (limited to 'ui')
-rw-r--r--ui/editdialog.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/editdialog.go b/ui/editdialog.go
index 70f4df2a..fec2f4d2 100644
--- a/ui/editdialog.go
+++ b/ui/editdialog.go
@@ -255,8 +255,9 @@ func (dlg *EditDialog) onBlockUntunneledTrafficCBCheckedChanged() {
return
err:
- showErrorCustom(dlg, "Invalid configuration", "Unable to toggle untunneled traffic blocking state.")
- dlg.blockUntunneledTrafficCB.SetVisible(false)
+ text := dlg.syntaxEdit.Text()
+ dlg.syntaxEdit.SetText("")
+ dlg.syntaxEdit.SetText(text)
}
func (dlg *EditDialog) onBlockUntunneledTrafficStateChanged(state int) {