mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 12:58:33 +01:00
modify unnecessarily thorough SetAreaDirty when adding/removing children
This commit is contained in:
parent
037ed43410
commit
85e63ac998
1 changed files with 4 additions and 2 deletions
|
@ -183,12 +183,15 @@ namespace MLEM.Ui.Elements {
|
|||
this.Root.OnElementAdded(e);
|
||||
});
|
||||
this.SetSortedChildrenDirty();
|
||||
this.SetAreaDirty();
|
||||
element.SetAreaDirty();
|
||||
return element;
|
||||
}
|
||||
|
||||
public void RemoveChild(Element element) {
|
||||
this.Children.Remove(element);
|
||||
// set area dirty here so that a dirty call is made
|
||||
// upwards to us if the element is auto-positioned
|
||||
element.SetAreaDirty();
|
||||
element.Parent = null;
|
||||
element.AndChildren(e => {
|
||||
e.Root = null;
|
||||
|
@ -197,7 +200,6 @@ namespace MLEM.Ui.Elements {
|
|||
this.Root.OnElementRemoved(e);
|
||||
});
|
||||
this.SetSortedChildrenDirty();
|
||||
this.SetAreaDirty();
|
||||
}
|
||||
|
||||
public void RemoveChildren(Func<Element, bool> condition = null) {
|
||||
|
|
Loading…
Reference in a new issue