From 48f2d128d4d983933df317d985848da345e2cdf3 Mon Sep 17 00:00:00 2001 From: Jason Knight Date: Thu, 21 Jul 2022 12:23:41 -0600 Subject: [PATCH] Call update_scrollbars() in sort_children() so the max is set properly so you can set scroll_container.scroll_vertical instantly after adding children to a scroll container. --- scene/gui/scroll_container.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp index 135bad46892..f0f6f8831b5 100644 --- a/scene/gui/scroll_container.cpp +++ b/scene/gui/scroll_container.cpp @@ -312,6 +312,7 @@ void ScrollContainer::_update_dimensions() { fit_child_in_rect(c, r); } + update_scrollbars(); update(); }