From e8caa0aa92d370cb4ab544b78e2718b8eb067269 Mon Sep 17 00:00:00 2001 From: smix8 <52464204+smix8@users.noreply.github.com> Date: Fri, 27 Oct 2023 15:18:08 +0200 Subject: [PATCH] Fix NavigationObstacle3DEditor parenting error Fixes NavigationObstacle3DEditor parenting error. --- editor/plugins/navigation_obstacle_3d_editor_plugin.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/editor/plugins/navigation_obstacle_3d_editor_plugin.cpp b/editor/plugins/navigation_obstacle_3d_editor_plugin.cpp index 9747ef4d487..5118f1d4585 100644 --- a/editor/plugins/navigation_obstacle_3d_editor_plugin.cpp +++ b/editor/plugins/navigation_obstacle_3d_editor_plugin.cpp @@ -503,7 +503,11 @@ void NavigationObstacle3DEditor::edit(Node *p_node) { wip.clear(); wip_active = false; edited_point = -1; - p_node->add_child(point_lines_meshinstance); + if (point_lines_meshinstance->get_parent()) { + point_lines_meshinstance->reparent(p_node, false); + } else { + p_node->add_child(point_lines_meshinstance); + } _polygon_draw(); } else {