diff options
author | Spartan322 <Megacake1234@gmail.com> | 2024-10-30 05:22:24 -0400 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2024-10-30 05:22:24 -0400 |
commit | 82de309d58c5f0e221b85463cca2983cd7ed0289 (patch) | |
tree | 5c87dc486c61310a1eafc2e7cb2fd52be0d52e22 /scene/gui/option_button.cpp | |
parent | 77eaec766e2e40f2a5d399989d827f9582a3be15 (diff) | |
parent | 8004c7524fb9f43425c4d6f614410a76678e0f7c (diff) | |
download | redot-engine-82de309d58c5f0e221b85463cca2983cd7ed0289.tar.gz |
Merge commit godotengine/godot@8004c7524fb9f43425c4d6f614410a76678e0f7c
Diffstat (limited to 'scene/gui/option_button.cpp')
-rw-r--r-- | scene/gui/option_button.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp index 61ead577a7..5d62fe39ef 100644 --- a/scene/gui/option_button.cpp +++ b/scene/gui/option_button.cpp @@ -227,7 +227,7 @@ void OptionButton::set_item_icon(int p_idx, const Ref<Texture2D> &p_icon) { popup->set_item_icon(p_idx, p_icon); if (current == p_idx) { - set_icon(p_icon); + set_button_icon(p_icon); } _queue_update_size_cache(); } @@ -383,7 +383,7 @@ void OptionButton::_select(int p_which, bool p_emit) { current = NONE_SELECTED; set_text(""); - set_icon(nullptr); + set_button_icon(nullptr); } else { ERR_FAIL_INDEX(p_which, popup->get_item_count()); @@ -393,7 +393,7 @@ void OptionButton::_select(int p_which, bool p_emit) { current = p_which; set_text(popup->get_item_text(current)); - set_icon(popup->get_item_icon(current)); + set_button_icon(popup->get_item_icon(current)); } if (is_inside_tree() && p_emit) { |