瀏覽代碼

Merge pull request #46435 from Hassan-A/MeshLibrary-RemoveItem-Fix

Fix mesh library remove selected item menu option
Rémi Verschelde 2 年之前
父節點
當前提交
9f7744ee0e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      editor/plugins/mesh_library_editor_plugin.cpp

+ 1 - 1
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));