[macOS] Fix changing main menu item names.

This commit is contained in:
bruvzg 2024-02-03 21:12:48 +02:00
parent 1c8ae43efe
commit 112f489449
No known key found for this signature in database
GPG key ID: 7960FCF39844EC38

View file

@ -1676,6 +1676,10 @@ void DisplayServerMacOS::global_menu_set_item_text(const String &p_menu_root, in
NSMenuItem *menu_item = [menu itemAtIndex:p_idx];
if (menu_item) {
[menu_item setTitle:[NSString stringWithUTF8String:p_text.utf8().get_data()]];
NSMenu *sub_menu = [menu_item submenu];
if (sub_menu) {
[sub_menu setTitle:[NSString stringWithUTF8String:p_text.utf8().get_data()]];
}
}
}
}