Fix OptionButton not removing icon when using clear
This commit is contained in:
parent
0c51ede243
commit
5c59a75923
1 changed files with 2 additions and 1 deletions
|
|
@ -394,6 +394,7 @@ void OptionButton::add_separator(const String &p_text) {
|
|||
void OptionButton::clear() {
|
||||
popup->clear();
|
||||
set_text("");
|
||||
set_button_icon(Ref<Texture2D>());
|
||||
current = NONE_SELECTED;
|
||||
_refresh_size_cache();
|
||||
}
|
||||
|
|
@ -410,7 +411,7 @@ void OptionButton::_select(int p_which, bool p_emit) {
|
|||
|
||||
current = NONE_SELECTED;
|
||||
set_text("");
|
||||
set_button_icon(nullptr);
|
||||
set_button_icon(Ref<Texture2D>());
|
||||
} else {
|
||||
ERR_FAIL_INDEX(p_which, popup->get_item_count());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue