From b73d2980b7e6a823f5065315355f7f7af20f6660 Mon Sep 17 00:00:00 2001 From: Jason Knight Date: Thu, 21 Jul 2022 12:14:59 -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 086eba0d491..cbf2987e838 100644 --- a/scene/gui/scroll_container.cpp +++ b/scene/gui/scroll_container.cpp @@ -304,6 +304,7 @@ void ScrollContainer::_update_dimensions() { fit_child_in_rect(c, r); } + update_scrollbars(); update(); }