Fix NavigationObstacle3DEditor parenting error

Fixes NavigationObstacle3DEditor parenting error.
This commit is contained in:
smix8 2023-10-27 15:18:08 +02:00
parent ba79e53dd0
commit e8caa0aa92

View file

@ -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 {