ソースを参照

Fixed output prints " Signal 'node_removed' is already connected " when the editor settings window is closed.

Close #38012

(cherry picked from commit ef08e64afb77834120596484309cfd0f4618d7c9)
dankan1890 5 年 前
コミット
a5bbd13794
1 ファイル変更6 行追加5 行削除
  1. 6 5
      editor/plugins/tile_map_editor_plugin.cpp

+ 6 - 5
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"));