ScrollContainer expand children bug fix

(cherry picked from commit 853161a000)
This commit is contained in:
Pawel Kowal 2016-07-27 20:24:10 +02:00 committed by Rémi Verschelde
parent ee23649813
commit 2b43d0a028
2 changed files with 3 additions and 3 deletions

View file

@ -228,14 +228,14 @@ void ScrollContainer::_notification(int p_what) {
child_max_size.y = MAX(child_max_size.y, minsize.y);
Rect2 r = Rect2(-scroll,minsize);
if (!scroll_h) {
if (!h_scroll->is_visible()) {
r.pos.x=0;
if (c->get_h_size_flags()&SIZE_EXPAND)
r.size.width=MAX(size.width,minsize.width);
else
r.size.width=minsize.width;
}
if (!scroll_v) {
if (!v_scroll->is_visible()) {
r.pos.y=0;
r.size.height=size.height;
if (c->get_v_size_flags()&SIZE_EXPAND)