mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Fix option_button.cpp not updating selected when out of bounds
This commit is contained in:
parent
45fc515ae3
commit
cf7e88f6ac
1 changed files with 4 additions and 0 deletions
|
|
@ -314,6 +314,10 @@ void OptionButton::set_item_count(int p_count) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (current > p_count - 1) {
|
||||||
|
_select(p_count - 1, false);
|
||||||
|
}
|
||||||
|
|
||||||
popup->set_item_count(p_count);
|
popup->set_item_count(p_count);
|
||||||
|
|
||||||
if (p_count > count_old) {
|
if (p_count > count_old) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue