From 480e864b53e1c6664478c03eb1369bb7761d83ea Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Sat, 9 Jan 2021 17:08:35 +0100 Subject: [PATCH] Show event wasn't invoked on overlay when visibility was set to true on add. --- ui/overlays.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/overlays.go b/ui/overlays.go index 6f3dc6c..619503d 100644 --- a/ui/overlays.go +++ b/ui/overlays.go @@ -57,7 +57,10 @@ func (o *Overlays) setVisibility(name string, visible bool) { func (o *Overlays) AddOnTop(name string, overlay Overlay, visible bool) { o.order = append(o.order, name) o.overlays[name] = overlay - o.visible[name] = visible + o.visible[name] = false + if visible { + o.Show(name) + } } func (o *Overlays) AddOnBottom(name string, overlay Overlay, visible bool) {