From 8f555f82ee9f296838e99ade8161cde10c85e3b8 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Wed, 15 May 2024 01:18:17 -0400 Subject: [PATCH] Don't invalidate box if texture was set redundantly --- box.go | 1 + 1 file changed, 1 insertion(+) diff --git a/box.go b/box.go index baf968e..5c46d92 100644 --- a/box.go +++ b/box.go @@ -117,6 +117,7 @@ func (this *box) SetColor (c color.Color) { } func (this *box) SetTexture (texture canvas.Texture) { + if this.texture == texture { return } this.texture = xcanvas.AssertTexture(texture) this.invalidateDraw() }