diff options
author | sanikoyes <sanikoyes@163.com> | 2016-09-13 11:50:41 +0800 |
---|---|---|
committer | sanikoyes <sanikoyes@163.com> | 2016-09-13 11:50:41 +0800 |
commit | b548ef000927ea90306efc0808ec866bd09e4fe9 (patch) | |
tree | fe54ea0d4db52c60eaed81d5ca15218d2e132066 /scene/gui | |
parent | 291e9858828cc7007700ac8b65179a32f9a80fe5 (diff) |
fix ScrollContainer cannot scroll when scroll bar is hidden
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/scroll_container.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp index 0fa2856ca4..479bb96fe2 100644 --- a/scene/gui/scroll_container.cpp +++ b/scene/gui/scroll_container.cpp @@ -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 (!h_scroll->is_visible()) { + if (!(scroll_h || 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 (!v_scroll->is_visible()) { + if (!(scroll_v || v_scroll->is_visible())) { r.pos.y=0; r.size.height=size.height; if (c->get_v_size_flags()&SIZE_EXPAND) |