mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-06-27 06:51:43 +02:00
only update an element and its children if the area actually changed
This commit is contained in:
parent
1ee7fafc23
commit
9deb6bbce3
|
@ -307,7 +307,11 @@ namespace MLEM.Ui.Elements {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.area = new Rectangle(pos, actualSize);
|
var newArea = new Rectangle(pos, actualSize);
|
||||||
|
if (newArea == this.area)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this.area = newArea;
|
||||||
this.OnAreaUpdated?.Invoke(this);
|
this.OnAreaUpdated?.Invoke(this);
|
||||||
|
|
||||||
foreach (var child in this.Children)
|
foreach (var child in this.Children)
|
||||||
|
|
Loading…
Reference in a new issue