1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-26 14:38:34 +01:00

also apply auto-sizing if the element has no children at all

This commit is contained in:
Ell 2021-04-26 19:21:11 +02:00
parent 2abc3264a2
commit f60c3b288a

View file

@ -623,7 +623,7 @@ namespace MLEM.Ui.Elements {
foreach (var child in this.Children) foreach (var child in this.Children)
child.ForceUpdateArea(); child.ForceUpdateArea();
if (this.Children.Count > 0) { if (this.SetWidthBasedOnChildren || this.SetHeightBasedOnChildren) {
Element foundChild = null; Element foundChild = null;
var autoSize = this.UnscrolledArea.Size; var autoSize = this.UnscrolledArea.Size;
if (this.SetHeightBasedOnChildren) { if (this.SetHeightBasedOnChildren) {