From 189acbee60f3d3149577db5446d9115352f60216 Mon Sep 17 00:00:00 2001 From: Haz Date: Thu, 25 Feb 2021 19:06:32 -0500 Subject: [PATCH] Fix mesh library remove selected item menu option Fixes #45969. --- editor/plugins/mesh_library_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp index 2981862291b..ec2421573fc 100644 --- a/editor/plugins/mesh_library_editor_plugin.cpp +++ b/editor/plugins/mesh_library_editor_plugin.cpp @@ -232,7 +232,7 @@ void MeshLibraryEditor::_menu_cbk(int p_option) { } break; case MENU_OPTION_REMOVE_ITEM: { String p = InspectorDock::get_inspector_singleton()->get_selected_path(); - if (p.begins_with("/MeshLibrary/item") && p.get_slice_count("/") >= 3) { + if (p.begins_with("/MeshLibrary/item") && p.get_slice_count("/") >= 2) { to_erase = p.get_slice("/", 3).to_int(); cd_remove->set_text(vformat(TTR("Remove item %d?"), to_erase)); cd_remove->popup_centered(Size2(300, 60));