Merge pull request #97977 from syntaxerror247/menu_bar_refresh_bug

Refresh `MenuBar` scene after child renamed in editor
This commit is contained in:
Clay John 2024-10-18 13:54:27 -07:00 committed by GitHub
commit 80f0b33313
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -510,6 +510,7 @@ void MenuBar::_refresh_menu_names() {
if (!popups[i]->has_meta("_menu_name") && String(popups[i]->get_name()) != get_menu_title(i)) {
menu_cache.write[i].name = popups[i]->get_name();
shape(menu_cache.write[i]);
queue_redraw();
if (is_global && menu_cache[i].submenu_rid.is_valid()) {
int item_idx = nmenu->find_item_index_with_submenu(main_menu, menu_cache[i].submenu_rid);
if (item_idx >= 0) {