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

auto-expanding components only need to update when not on top

This commit is contained in:
Ellpeck 2019-08-11 21:57:16 +02:00
parent 5246c0be60
commit 0faa2756f5

View file

@ -272,6 +272,7 @@ namespace MLEM.Ui.Elements {
var newHeight = (height - pos.Y + this.ScaledChildPadding.Y) / this.Scale; var newHeight = (height - pos.Y + this.ScaledChildPadding.Y) / this.Scale;
if (newHeight != this.size.Y) { if (newHeight != this.size.Y) {
this.size.Y = newHeight; this.size.Y = newHeight;
if (this.Anchor > Anchor.TopRight)
this.ForceUpdateArea(); this.ForceUpdateArea();
} }
} }