summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authordankan1890 <mewuidev2@gmail.com>2020-04-22 04:26:44 +0200
committerdankan1890 <mewuidev2@gmail.com>2020-04-22 04:26:44 +0200
commitef08e64afb77834120596484309cfd0f4618d7c9 (patch)
tree36f3e0bb25b268d5f448e1bc00bb44a41053dc48 /editor/plugins
parentf914276951df640349ce7d10e4344993a4adfedc (diff)
Fixed output prints " Signal 'node_removed' is already connected " when the editor settings window is closed.
Close #38012
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp
index ce421ac0a5..9e88cd8889 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", callable_mp(this, &TileMapEditor::_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", callable_mp(this, &TileMapEditor::_node_removed));
paint_button->set_icon(get_theme_icon("Edit", "EditorIcons"));
bucket_fill_button->set_icon(get_theme_icon("Bucket", "EditorIcons"));
picker_button->set_icon(get_theme_icon("ColorPick", "EditorIcons"));