You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #109755 from Giganzo/option-button-icon-clear
Fix OptionButton not removing icon when using clear
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user