From 4d80a4f0474201f83c578333405c06b5301893ea Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 16 Mar 2022 12:02:55 +0100 Subject: [PATCH] Actually add the tool mode external button to the spatial editor's menu. This also fixes a memleak. --- editor/plugins/spatial_editor_plugin.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index deb1d944a..3f9ad2338 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -6997,6 +6997,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { update_portal_tools(); tool_button[TOOL_MODE_EXTERNAL] = memnew(ToolButton); + hbc_menu->add_child(tool_button[TOOL_MODE_EXTERNAL]); button_binds.write[0] = MENU_TOOL_EXTERNAL; tool_button[TOOL_MODE_EXTERNAL]->connect("pressed", this, "_menu_item_pressed", button_binds); }