Skip to content

Commit 86bb48a

Browse files
committed
Merge pull request #109755 from Giganzo/option-button-icon-clear
Fix OptionButton not removing icon when using clear
2 parents 3bb4230 + 5c59a75 commit 86bb48a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scene/gui/option_button.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ void OptionButton::add_separator(const String &p_text) {
394394
void OptionButton::clear() {
395395
popup->clear();
396396
set_text("");
397+
set_button_icon(Ref<Texture2D>());
397398
current = NONE_SELECTED;
398399
_refresh_size_cache();
399400
}
@@ -410,7 +411,7 @@ void OptionButton::_select(int p_which, bool p_emit) {
410411

411412
current = NONE_SELECTED;
412413
set_text("");
413-
set_button_icon(nullptr);
414+
set_button_icon(Ref<Texture2D>());
414415
} else {
415416
ERR_FAIL_INDEX(p_which, popup->get_item_count());
416417

0 commit comments

Comments
 (0)