From 5fcee515e2f51e0f01002ca44a0b0a594df30e87 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 11 Nov 2023 12:43:17 +0100 Subject: [PATCH] this would never happen --- MLEM.Ui/Elements/Panel.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/MLEM.Ui/Elements/Panel.cs b/MLEM.Ui/Elements/Panel.cs index ce29469..1d702eb 100644 --- a/MLEM.Ui/Elements/Panel.cs +++ b/MLEM.Ui/Elements/Panel.cs @@ -355,11 +355,8 @@ namespace MLEM.Ui.Elements { } private void ScrollChildren() { - if (!this.scrollOverflow) { - if (this.scrolledChildren.Count > 0) - this.scrolledChildren.Clear(); + if (!this.scrollOverflow) return; - } // we ignore false grandchildren so that the children of the scroll bar stay in place var currentChildren = new HashSet(this.GetChildren(c => c != this.ScrollBar, true, true));