From f8cc2e054db5a34ad828da494484a53013b94767 Mon Sep 17 00:00:00 2001 From: SaracenOne Date: Wed, 13 Apr 2022 04:10:44 +0100 Subject: Ensure gizmos are added to newly created Node3D-derivatives and silence error for attempting to create gizmos twice --- editor/plugins/node_3d_editor_plugin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'editor/plugins/node_3d_editor_plugin.cpp') diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 855fc2b2a9..f2ca1fcfeb 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -7120,7 +7120,9 @@ void Node3DEditor::_request_gizmo(Object *p_obj) { } } } - sp->update_gizmos(); + if (!sp->get_gizmos().is_empty()) { + sp->update_gizmos(); + } } } -- cgit v1.2.3