Browse Source

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.

Jason Knight 3 năm trước cách đây
mục cha
commit
b73d2980b7
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      scene/gui/scroll_container.cpp

+ 1 - 0
scene/gui/scroll_container.cpp

@@ -304,6 +304,7 @@ void ScrollContainer::_update_dimensions() {
 		fit_child_in_rect(c, r);
 	}
 
+	update_scrollbars();
 	update();
 }