From 6d1401cb8d50d6f0516376cc31585664f50ead92 Mon Sep 17 00:00:00 2001 From: Raul Santos Date: Wed, 18 Oct 2023 20:20:46 +0200 Subject: [PATCH] Enable new addon after hiding ProjectSettings - Enabling newly created addons can show a warning dialog, doing so before hiding the `ProjectSettingsEditor` dialog causes rendering glitches. - Remove unused `PuginConfigDialog` in `EditorNode`. The one actually being used is an instance in `EditorPluginSettings`. (cherry picked from commit 7b34fa8dd2c362e2fde8ed26dc979f655d311fe3) --- editor/editor_node.cpp | 10 +++------- editor/editor_node.h | 2 -- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 17ae863a6f6..cfa8885b526 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -854,12 +854,12 @@ void EditorNode::_on_plugin_ready(Object *p_script, const String &p_activate_nam if (scr.is_null()) { return; } - if (p_activate_name.length()) { - set_addon_plugin_enabled(p_activate_name, true); - } project_settings_editor->update_plugins(); project_settings_editor->hide(); push_item(scr.operator->()); + if (p_activate_name.length()) { + set_addon_plugin_enabled(p_activate_name, true); + } } void EditorNode::_remove_plugin_from_enabled(const String &p_name) { @@ -7443,10 +7443,6 @@ EditorNode::EditorNode() { project_menu->add_item(TTR("Customize Engine Build Configuration..."), TOOLS_BUILD_PROFILE_MANAGER); project_menu->add_separator(); - plugin_config_dialog = memnew(PluginConfigDialog); - plugin_config_dialog->connect("plugin_ready", callable_mp(this, &EditorNode::_on_plugin_ready)); - gui_base->add_child(plugin_config_dialog); - tool_menu = memnew(PopupMenu); tool_menu->set_name("Tools"); tool_menu->connect("index_pressed", callable_mp(this, &EditorNode::_tool_menu_option)); diff --git a/editor/editor_node.h b/editor/editor_node.h index 7c7cd838e8f..40e78f2961d 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -357,8 +357,6 @@ private: Timer *screenshot_timer = nullptr; - PluginConfigDialog *plugin_config_dialog = nullptr; - RichTextLabel *load_errors = nullptr; AcceptDialog *load_error_dialog = nullptr;