1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-26 14:38:34 +01: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. /// Prepares the panel for auto-scrolling, creating the render target and setting up the scroll bar's maximum value.
/// </summary> /// </summary>
protected virtual void ScrollSetup() { protected virtual void ScrollSetup() {
if (!this.scrollOverflow) if (!this.scrollOverflow || this.IsHidden)
return; return;
// if there is only one child, then we have just the scroll bar // if there is only one child, then we have just the scroll bar
if (this.Children.Count == 1) if (this.Children.Count == 1)