From a5bbd13794b6b0f791857e3b76e7b5a100c7d179 Mon Sep 17 00:00:00 2001 From: dankan1890 Date: Wed, 22 Apr 2020 04:26:44 +0200 Subject: [PATCH] Fixed output prints " Signal 'node_removed' is already connected " when the editor settings window is closed. Close #38012 (cherry picked from commit ef08e64afb77834120596484309cfd0f4618d7c9) --- editor/plugins/tile_map_editor_plugin.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index 3a1fc6c7d0c..8736b88b71e 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -57,17 +57,18 @@ void TileMapEditor::_notification(int p_what) { } break; + case NOTIFICATION_ENTER_TREE: { + + get_tree()->connect("node_removed", this, "_node_removed"); + FALLTHROUGH; + } + case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { if (is_visible_in_tree()) { _update_palette(); } - FALLTHROUGH; - } - case NOTIFICATION_ENTER_TREE: { - - get_tree()->connect("node_removed", this, "_node_removed"); paint_button->set_icon(get_icon("Edit", "EditorIcons")); bucket_fill_button->set_icon(get_icon("Bucket", "EditorIcons")); picker_button->set_icon(get_icon("ColorPick", "EditorIcons"));