aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-06-11 11:31:33 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-06-11 11:31:33 +0200
commit25aee52f0a40543863a0da49fc1ef4479e965b55 (patch)
treea98ae74035d569b27915b372eb68ef7b712790e1 /ui
parentversion: bump (diff)
downloadwireguard-windows-25aee52f0a40543863a0da49fc1ef4479e965b55.tar.xz
wireguard-windows-25aee52f0a40543863a0da49fc1ef4479e965b55.zip
ui: confview: only suspend if interface is changing
Diffstat (limited to 'ui')
-rw-r--r--ui/confview.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/confview.go b/ui/confview.go
index b84852b3..5a2e5dab 100644
--- a/ui/confview.go
+++ b/ui/confview.go
@@ -502,15 +502,15 @@ func (cv *ConfView) setTunnel(tunnel *manager.Tunnel, config *conf.Config, state
if !(cv.tunnel == nil || tunnel == nil || tunnel.Name == cv.tunnel.Name) {
return
}
- cv.SetSuspended(true)
- defer cv.SetSuspended(false)
-
- cv.name.SetVisible(tunnel != nil)
title := "Interface: " + config.Name
if cv.name.Title() != title {
+ cv.SetSuspended(true)
+ defer cv.SetSuspended(false)
cv.name.SetTitle(title)
}
+ cv.name.SetVisible(tunnel != nil)
+
cv.interfaze.apply(&config.Interface)
cv.interfaze.status.update(state)
cv.interfaze.toggleActive.update(state)