Don't invalidate box if texture was set redundantly
This commit is contained in:
1
box.go
1
box.go
@@ -117,6 +117,7 @@ func (this *box) SetColor (c color.Color) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *box) SetTexture (texture canvas.Texture) {
|
func (this *box) SetTexture (texture canvas.Texture) {
|
||||||
|
if this.texture == texture { return }
|
||||||
this.texture = xcanvas.AssertTexture(texture)
|
this.texture = xcanvas.AssertTexture(texture)
|
||||||
this.invalidateDraw()
|
this.invalidateDraw()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user