From 2c559feb9245baafed1d7a8d47ff24ad50855e89 Mon Sep 17 00:00:00 2001 From: allkhor Date: Mon, 9 Dec 2019 01:11:37 +0600 Subject: Fixed strange behaviour of scroll in the ItemList. --- scene/gui/item_list.cpp | 4 ++-- 1 file 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) -- cgit v1.2.3