Fix ItemList not update when icon scale changes

(cherry picked from commit 1bf4c12c0a)
This commit is contained in:
Haoyu Qiu 2023-09-03 19:10:24 +08:00 committed by Yuri Sizov
parent a972686972
commit 9dfb3ddad5
1 changed files with 7 additions and 0 deletions

View File

@ -1603,7 +1603,14 @@ bool ItemList::get_allow_search() const {
void ItemList::set_icon_scale(real_t p_scale) { void ItemList::set_icon_scale(real_t p_scale) {
ERR_FAIL_COND(!Math::is_finite(p_scale)); ERR_FAIL_COND(!Math::is_finite(p_scale));
if (icon_scale == p_scale) {
return;
}
icon_scale = p_scale; icon_scale = p_scale;
queue_redraw();
shape_changed = true;
} }
real_t ItemList::get_icon_scale() const { real_t ItemList::get_icon_scale() const {