Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Fix "Remove" button in `MeshLibrary` editor being enabled when it shouldn't

Michael Alexsander8e9c1849a79c
diff --git a/editor/scene/3d/mesh_library_editor_plugin.cpp b/editor/scene/3d/mesh_library_editor_plugin.cpp
index 292cd67d70f..b596bdf89a2 100644
--- a/editor/scene/3d/mesh_library_editor_plugin.cpp
+++ b/editor/scene/3d/mesh_library_editor_plugin.cpp
@@ -176,7 +176,9 @@ void MeshLibraryEditor::edit(const Ref<MeshLibrary> &p_mesh_library) {
bool read_only = EditorNode::get_singleton()->is_resource_read_only(mesh_library);
add_item->set_disabled(read_only);
- remove_item->set_disabled(read_only);
+ if (read_only) {
+ remove_item->set_disabled(true);
+ }
import_scene->set_disabled(read_only);
inspector->set_read_only(read_only);
}