mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-10-31 21:00:51 +01:00
only update an element and its children if the area actually changed
This commit is contained in:
parent
1ee7fafc23
commit
9deb6bbce3
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
||||
foreach (var child in this.Children)
|
||||
|
|
Loading…
Reference in a new issue