diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp index 9d9d04424b9..607cbddab4e 100644 --- a/scene/gui/option_button.cpp +++ b/scene/gui/option_button.cpp @@ -314,6 +314,10 @@ void OptionButton::set_item_count(int p_count) { return; } + if (current > p_count - 1) { + _select(p_count - 1, false); + } + popup->set_item_count(p_count); if (p_count > count_old) {