From a64c27953a7f49515a169403f57d7774855111fd Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Wed, 15 May 2024 01:18:58 -0400 Subject: [PATCH] Don't invalidate ContainerBox's children when something is set redundantly --- containerbox.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/containerbox.go b/containerbox.go index 96c27b4..4c37f92 100644 --- a/containerbox.go +++ b/containerbox.go @@ -31,11 +31,13 @@ func (backend *Backend) NewContainerBox() tomo.ContainerBox { } func (this *containerBox) SetColor (c color.Color) { + if this.color == c { return } this.box.SetColor(c) this.invalidateTransparentChildren() } func (this *containerBox) SetTexture (texture canvas.Texture) { + if this.texture == texture { return } this.box.SetTexture(texture) this.invalidateTransparentChildren() }