summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2023-02-12 13:47:35 +0100
committerGitHub <noreply@github.com>2023-02-12 13:47:35 +0100
commit3fcd98997257a6b856d70a3cf8846c5ac282f823 (patch)
tree619afbcee711e06c028516b3f402f0053f079786 /editor/plugins
parent1d0e7f0222e2f6da16bea959a4170ac754110d56 (diff)
parentaa9d2149e74233b834d168a725c8b119cc72619c (diff)
Merge pull request #73150 from MmAaXx500/meshlib-remove
Round 2: Fix mesh library remove selected item menu option
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/mesh_library_editor_plugin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp
index ec2421573f..cf8555d07d 100644
--- a/editor/plugins/mesh_library_editor_plugin.cpp
+++ b/editor/plugins/mesh_library_editor_plugin.cpp
@@ -232,8 +232,8 @@ 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("/") >= 2) {
- 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));
}