Don't invalidate box if texture was set redundantly
This commit is contained in:
parent
79f81688bb
commit
8f555f82ee
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