Fix tag setting not invalidating style

This commit is contained in:
Sasha Koshka 2024-08-14 19:59:53 -04:00
parent fa2ef954b2
commit b18f747f0c

View File

@ -130,11 +130,15 @@ func (this *box) Tag (tag string) bool {
} }
func (this *box) SetTag (tag string, on bool) { func (this *box) SetTag (tag string, on bool) {
wasOn := this.tags.Has(tag)
if on { if on {
this.tags.Add(tag) this.tags.Add(tag)
} else { } else {
delete(this.tags, tag) delete(this.tags, tag)
} }
if wasOn != on {
this.invalidateStyle()
}
} }
func (this *box) SetAttr (attr tomo.Attr) { func (this *box) SetAttr (attr tomo.Attr) {