1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-12-25 17:59:24 +01:00

fixed setheightbasedonchildren causing stack overflow on uneven resolutions

This commit is contained in:
Ellpeck 2019-11-05 13:50:01 +01:00
parent f1c9ba5517
commit aecf1a565e

View file

@ -311,7 +311,7 @@ namespace MLEM.Ui.Elements {
var lowest = this.GetLowestChild(e => !e.IsHidden);
if (lowest != null) {
var newHeight = (lowest.UnscrolledArea.Bottom - pos.Y + this.ScaledChildPadding.Y) / this.Scale;
if (newHeight != this.size.Y) {
if ((int) newHeight != (int) this.size.Y) {
this.size.Y = newHeight;
this.ForceUpdateArea();
}