summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-12-09 08:50:22 +0100
committerGitHub <noreply@github.com>2019-12-09 08:50:22 +0100
commit2c606647df849af203c3c5dbdfa98a82569909b6 (patch)
treeb35ccc9a6edda3d5fc18b5db1440954bf6d12efb /scene/gui
parent37710389469a6daa5213f31679d53ea21a8f0429 (diff)
parent2c559feb9245baafed1d7a8d47ff24ad50855e89 (diff)
Merge pull request #34208 from allkhor/fix_scroll_item_list
Fixed strange behaviour of scroll in the ItemList.
Diffstat (limited to 'scene/gui')
-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)