From 0faa2756f59dd220654026fe5c8537f93921045e Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 11 Aug 2019 21:57:16 +0200 Subject: [PATCH] auto-expanding components only need to update when not on top --- MLEM.Ui/Elements/Element.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MLEM.Ui/Elements/Element.cs b/MLEM.Ui/Elements/Element.cs index b1119df..e4c83d3 100644 --- a/MLEM.Ui/Elements/Element.cs +++ b/MLEM.Ui/Elements/Element.cs @@ -272,7 +272,8 @@ namespace MLEM.Ui.Elements { var newHeight = (height - pos.Y + this.ScaledChildPadding.Y) / this.Scale; if (newHeight != this.size.Y) { this.size.Y = newHeight; - this.ForceUpdateArea(); + if (this.Anchor > Anchor.TopRight) + this.ForceUpdateArea(); } } }