From c4c4da77b103e134e9df889e9156b15dde7eb283 Mon Sep 17 00:00:00 2001 From: MmAaXx500 Date: Tue, 26 Jul 2022 22:02:53 +0200 Subject: [PATCH] Prevent autoloads from being added or removed twice --- editor/editor_autoload_settings.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp index ee4955d0a01..2447446852a 100644 --- a/editor/editor_autoload_settings.cpp +++ b/editor/editor_autoload_settings.cpp @@ -529,8 +529,6 @@ void EditorAutoloadSettings::update_autoload() { info.node->queue_delete(); info.node = nullptr; } - - ProjectSettings::get_singleton()->remove_autoload(info.name); } // Load new/changed autoloads @@ -555,12 +553,6 @@ void EditorAutoloadSettings::update_autoload() { } } - ProjectSettings::AutoloadInfo prop_info; - prop_info.name = info->name; - prop_info.path = info->path; - prop_info.is_singleton = info->is_singleton; - ProjectSettings::get_singleton()->add_autoload(prop_info); - if (!info->in_editor && !info->is_singleton) { // No reason to keep this node memdelete(info->node);