Don't invalidate box if texture was set redundantly

This commit is contained in:
Sasha Koshka 2024-05-15 01:18:17 -04:00
parent 79f81688bb
commit 8f555f82ee

1
box.go
View File

@ -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()
}