1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-12-26 02:09:24 +01:00

Fixed removing and later adding children to a scrolling panel showing the scroll bar erroneously

This commit is contained in:
Ell 2023-05-23 11:18:10 +02:00
parent 2463c27a5d
commit 5266d00796
2 changed files with 5 additions and 0 deletions

View file

@ -52,6 +52,7 @@ Fixes
- Fixed Paragraph and Checkbox not reacting to SquishingGroup sizing properly
- Fixed TextInput and Slider still reacting to input when they are selected, but not part of the active root
- Fixed dropdown menu panels not updating their width when the dropdown's width changes
- Fixed removing and later adding children to a scrolling panel showing the scroll bar erroneously
### MLEM.Data
Improvements

View file

@ -133,6 +133,10 @@ namespace MLEM.Ui.Elements {
if (element == this.ScrollBar)
throw new NotSupportedException("A panel that scrolls overflow cannot have its scroll bar removed from its list of children");
base.RemoveChild(element);
// when removing children, our scroll bar might have to be hidden
// if we don't do this before adding children again, they might incorrectly assume that the scroll bar will still be visible and adjust their size accordingly
this.ScrollSetup();
}
/// <inheritdoc />