소스 검색

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 년 전
부모
커밋
48f2d128d4
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      scene/gui/scroll_container.cpp

+ 1 - 0
scene/gui/scroll_container.cpp

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