1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-05-31 20:33:38 +02:00

fixed hidden panels trying to update, causing a crash

This commit is contained in:
Ellpeck 2020-05-30 22:48:09 +02:00
parent 78049c9cd8
commit 6c03ef2bd9

View file

@ -199,7 +199,7 @@ namespace MLEM.Ui.Elements {
/// Prepares the panel for auto-scrolling, creating the render target and setting up the scroll bar's maximum value.
/// </summary>
protected virtual void ScrollSetup() {
if (!this.scrollOverflow)
if (!this.scrollOverflow || this.IsHidden)
return;
// if there is only one child, then we have just the scroll bar
if (this.Children.Count == 1)