Show event wasn't invoked on overlay when visibility was set to true on add.

This commit is contained in:
Sander Schobers 2021-01-09 17:08:35 +01:00
parent 9dc301eed8
commit 480e864b53

View File

@ -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) {