Fix mesh library remove selected item menu option
Fixes #45969. (cherry picked from commits189acbee60
andaa9d2149e7
)
This commit is contained in:
parent
47e64671f6
commit
e3be3fbc59
1 changed files with 2 additions and 2 deletions
|
@ -229,8 +229,8 @@ void MeshLibraryEditor::_menu_cbk(int p_option) {
|
|||
} break;
|
||||
case MENU_OPTION_REMOVE_ITEM: {
|
||||
String p = editor->get_inspector()->get_selected_path();
|
||||
if (p.begins_with("/MeshLibrary/item") && p.get_slice_count("/") >= 3) {
|
||||
to_erase = p.get_slice("/", 3).to_int();
|
||||
if (p.begins_with("item") && p.get_slice_count("/") >= 2) {
|
||||
to_erase = p.get_slice("/", 1).to_int();
|
||||
cd_remove->set_text(vformat(TTR("Remove item %d?"), to_erase));
|
||||
cd_remove->popup_centered(Size2(300, 60));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue