Merge pull request #73726 from KoBeWi/parenting_problems

Fix Polygon3DEditor parenting errors
This commit is contained in:
Rémi Verschelde 2023-02-22 10:13:13 +01:00
commit c86f18698e
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -506,7 +506,11 @@ void Polygon3DEditor::edit(Node *p_node) {
wip.clear();
wip_active = false;
edited_point = -1;
p_node->add_child(imgeom);
if (imgeom->get_parent()) {
imgeom->reparent(p_node, false);
} else {
p_node->add_child(imgeom);
}
_polygon_draw();
set_process(true);
prev_depth = -1;