mirror of
https://github.com/godotengine/godot.git
synced 2024-11-26 22:23:04 +00:00
Merge pull request #59165 from Rindbee/fix-text-buf-does-not-clear
Fix text buf does not clear when calling the method set_item_text in …
This commit is contained in:
commit
8e72be941c
@ -1003,8 +1003,12 @@ void PopupMenu::set_item_text(int p_idx, const String &p_text) {
|
||||
p_idx += get_item_count();
|
||||
}
|
||||
ERR_FAIL_INDEX(p_idx, items.size());
|
||||
if (items[p_idx].text == p_text) {
|
||||
return;
|
||||
}
|
||||
items.write[p_idx].text = p_text;
|
||||
items.write[p_idx].xl_text = atr(p_text);
|
||||
items.write[p_idx].dirty = true;
|
||||
_shape_item(p_idx);
|
||||
|
||||
control->update();
|
||||
|
Loading…
Reference in New Issue
Block a user