1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-22 20:58:34 +01:00

Fixed parents of elements that prevent spill not being notified properly

This commit is contained in:
Ell 2022-08-04 20:14:29 +02:00
parent b2898a8eae
commit 4d34a2fac1
2 changed files with 4 additions and 1 deletions

View file

@ -22,6 +22,9 @@ Improvements
- Allow elements to auto-adjust their size even when their children are aligned oddly - Allow elements to auto-adjust their size even when their children are aligned oddly
- Close other dropdowns when opening a dropdown - Close other dropdowns when opening a dropdown
Fixes
- Fixed parents of elements that prevent spill not being notified properly
### MLEM.Data ### MLEM.Data
Improvements Improvements
- Allow data texture atlas pivots and offsets to be negative - Allow data texture atlas pivots and offsets to be negative

View file

@ -1125,7 +1125,7 @@ namespace MLEM.Ui.Elements {
/// <param name="grandchild">Whether the <paramref name="child"/> is a grandchild of this element, rather than a direct child.</param> /// <param name="grandchild">Whether the <paramref name="child"/> is a grandchild of this element, rather than a direct child.</param>
protected virtual void OnChildAreaDirty(Element child, bool grandchild) { protected virtual void OnChildAreaDirty(Element child, bool grandchild) {
if (!grandchild) { if (!grandchild) {
if (child.Anchor.IsAuto() || this.SetWidthBasedOnChildren || this.SetHeightBasedOnChildren) if (child.Anchor.IsAuto() || child.PreventParentSpill || this.SetWidthBasedOnChildren || this.SetHeightBasedOnChildren)
this.SetAreaDirty(); this.SetAreaDirty();
} }
this.Parent?.OnChildAreaDirty(child, true); this.Parent?.OnChildAreaDirty(child, true);