Don't invalidate ContainerBox's children when something is set
redundantly
This commit is contained in:
parent
8f555f82ee
commit
a64c27953a
@ -31,11 +31,13 @@ func (backend *Backend) NewContainerBox() tomo.ContainerBox {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *containerBox) SetColor (c color.Color) {
|
func (this *containerBox) SetColor (c color.Color) {
|
||||||
|
if this.color == c { return }
|
||||||
this.box.SetColor(c)
|
this.box.SetColor(c)
|
||||||
this.invalidateTransparentChildren()
|
this.invalidateTransparentChildren()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *containerBox) SetTexture (texture canvas.Texture) {
|
func (this *containerBox) SetTexture (texture canvas.Texture) {
|
||||||
|
if this.texture == texture { return }
|
||||||
this.box.SetTexture(texture)
|
this.box.SetTexture(texture)
|
||||||
this.invalidateTransparentChildren()
|
this.invalidateTransparentChildren()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user