From f5b3b487d72c9d15da953503d2ff09712faea188 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 25 Aug 2019 01:59:12 +0200 Subject: 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 --- ui/editdialog.go | 5 +++-- 1 file 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) { -- cgit v1.2.3-59-g8ed1b