summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorallkhor <say2word@gmail.com>2019-12-09 01:11:37 +0600
committerallkhor <say2word@gmail.com>2019-12-09 01:54:10 +0600
commit2c559feb9245baafed1d7a8d47ff24ad50855e89 (patch)
tree4724ff2b7b675aa565faad8088b0e46b58b0c5cf /scene
parent8eb183aebb9c79ff92d6f566af7ad2f91696ce08 (diff)
Fixed strange behaviour of scroll in the ItemList.
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/item_list.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 3884622942..20bbcbde80 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -973,12 +973,12 @@ void ItemList::_notification(int p_what) {
float max = MAX(page, ofs.y + max_h);
if (auto_height)
auto_height_value = ofs.y + max_h + bg->get_minimum_size().height;
+ scroll_bar->set_max(max);
+ scroll_bar->set_page(page);
if (max <= page) {
scroll_bar->set_value(0);
scroll_bar->hide();
} else {
- scroll_bar->set_max(max);
- scroll_bar->set_page(page);
scroll_bar->show();
if (do_autoscroll_to_bottom)