diff options
author | George Marques <george@gmarqu.es> | 2017-12-09 14:59:01 -0200 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2017-12-09 14:59:01 -0200 |
commit | 59311903482722d015d05a1ce09c0eeefa9212f3 (patch) | |
tree | 59a82f9867bd55ad7cb94a2ca19fb48fe7201290 /editor/editor_plugin.cpp | |
parent | 20a566d63a34e5b502a0b46d3cbe655427f1bc76 (diff) | |
download | redot-engine-59311903482722d015d05a1ce09c0eeefa9212f3.tar.gz |
Defer the scan filesystem call when adding import plugins
This ensures every plugin is added before the scan is made.
Fix #12749
Diffstat (limited to 'editor/editor_plugin.cpp')
-rw-r--r-- | editor/editor_plugin.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index a39e4d6efb..5c4c2b694f 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -565,12 +565,12 @@ void EditorPlugin::save_global_state() {} void EditorPlugin::add_import_plugin(const Ref<EditorImportPlugin> &p_importer) { ResourceFormatImporter::get_singleton()->add_importer(p_importer); - EditorFileSystem::get_singleton()->scan(); + EditorFileSystem::get_singleton()->call_deferred("scan"); } void EditorPlugin::remove_import_plugin(const Ref<EditorImportPlugin> &p_importer) { ResourceFormatImporter::get_singleton()->remove_importer(p_importer); - EditorFileSystem::get_singleton()->scan(); + EditorFileSystem::get_singleton()->call_deferred("scan"); } void EditorPlugin::add_export_plugin(const Ref<EditorExportPlugin> &p_exporter) { @@ -587,7 +587,6 @@ void EditorPlugin::add_scene_import_plugin(const Ref<EditorSceneImporter> &p_imp void EditorPlugin::remove_scene_import_plugin(const Ref<EditorSceneImporter> &p_importer) { ResourceImporterScene::get_singleton()->remove_importer(p_importer); - } void EditorPlugin::set_window_layout(Ref<ConfigFile> p_layout) { |