From a76a7d83b44954dc2eacd9c99ea7393072e9051f Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Thu, 16 Apr 2026 12:51:06 -0300 Subject: [PATCH] Fix `MeshLibrary` editor taking priority over `GridMap` when it shouldn't --- editor/scene/3d/mesh_library_editor_plugin.cpp | 4 ++++ editor/scene/3d/mesh_library_editor_plugin.h | 2 ++ modules/gridmap/editor/grid_map_editor_plugin.cpp | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/editor/scene/3d/mesh_library_editor_plugin.cpp b/editor/scene/3d/mesh_library_editor_plugin.cpp index 75a9426ea6..02c6ee0ead 100644 --- a/editor/scene/3d/mesh_library_editor_plugin.cpp +++ b/editor/scene/3d/mesh_library_editor_plugin.cpp @@ -796,6 +796,10 @@ void MeshLibraryEditorPlugin::make_visible(bool p_visible) { } } +void MeshLibraryEditorPlugin::open_editor() { + mesh_library_editor->open(); +} + MeshLibraryEditorPlugin::MeshLibraryEditorPlugin() { singleton = this; diff --git a/editor/scene/3d/mesh_library_editor_plugin.h b/editor/scene/3d/mesh_library_editor_plugin.h index 1e4d21ede8..fa5d63820f 100644 --- a/editor/scene/3d/mesh_library_editor_plugin.h +++ b/editor/scene/3d/mesh_library_editor_plugin.h @@ -137,6 +137,8 @@ public: virtual bool handles(Object *p_node) const override; virtual void make_visible(bool p_visible) override; + void open_editor(); + MeshLibraryEditorPlugin(); ~MeshLibraryEditorPlugin() { singleton = nullptr; } }; diff --git a/modules/gridmap/editor/grid_map_editor_plugin.cpp b/modules/gridmap/editor/grid_map_editor_plugin.cpp index ea90a03678..c38f809b96 100644 --- a/modules/gridmap/editor/grid_map_editor_plugin.cpp +++ b/modules/gridmap/editor/grid_map_editor_plugin.cpp @@ -1183,7 +1183,7 @@ void GridMapEditor::_update_mesh_library() { if (mesh_library_editor_plugin) { mesh_library_editor_plugin->edit(*mesh_library); - mesh_library_editor_plugin->make_visible(true); + mesh_library_editor_plugin->open_editor(); } } else if (mesh_library_editor_plugin) { mesh_library_editor_plugin->edit(nullptr);