aboutsummaryrefslogtreecommitdiffstatshomepage
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
commitf5b3b487d72c9d15da953503d2ff09712faea188 (patch)
tree02f697d899476258f604042249e1f73f07e156af /ui
parentversion: use upstream RtlGetVersion (diff)
downloadwireguard-windows-f5b3b487d72c9d15da953503d2ff09712faea188.tar.xz
wireguard-windows-f5b3b487d72c9d15da953503d2ff09712faea188.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. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
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) {