diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-06-12 11:57:07 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-06-12 11:57:07 +0200 |
commit | 2c5f259cf5ac0849e321cdafb17f1904c5c059f3 (patch) | |
tree | 4447f086be3f5c7fc99bd45a6fb5abe87ed9593f | |
parent | 8f575d2991cef755b226a5263e5f044bd285c928 (diff) | |
parent | 0a4d0506d1761d2a6a9deaed54147c8e848f6db9 (diff) | |
download | redot-engine-2c5f259cf5ac0849e321cdafb17f1904c5c059f3.tar.gz |
Merge pull request #78124 from KoBeWi/leave_MeshLibrary_alone
Fix problems reloading MeshLibrary
-rw-r--r-- | editor/editor_node.cpp | 3 | ||||
-rw-r--r-- | editor/plugins/mesh_library_editor_plugin.cpp | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index cd74a13cb9..2ec05b0412 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2027,6 +2027,9 @@ void EditorNode::_dialog_action(String p_file) { if (err) { show_accept(TTR("Error saving MeshLibrary!"), TTR("OK")); return; + } else if (ResourceCache::has(p_file)) { + // Make sure MeshLibrary is updated in the editor. + ResourceLoader::load(p_file)->reload_from_file(); } } break; diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp index 7bee4d01ee..4cc96126de 100644 --- a/editor/plugins/mesh_library_editor_plugin.cpp +++ b/editor/plugins/mesh_library_editor_plugin.cpp @@ -301,6 +301,7 @@ void MeshLibraryEditorPlugin::edit(Object *p_node) { mesh_library_editor->edit(Object::cast_to<MeshLibrary>(p_node)); mesh_library_editor->show(); } else { + mesh_library_editor->edit(Ref<MeshLibrary>()); mesh_library_editor->hide(); } } |