diff options
author | kobewi <kobewi4e@gmail.com> | 2023-02-22 03:17:29 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2023-02-22 03:17:29 +0100 |
commit | f3040be3ba4ac42606a3f37a9a8af7444bc8979b (patch) | |
tree | ffe76d8a81d2f18a2f0ab8073aa2337f48c319a7 /editor/plugins | |
parent | e13fae1414b0369fdd3f51b4e3529fd3f272b0e1 (diff) |
Fix Polygon3DEditor parenting errors
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/polygon_3d_editor_plugin.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/plugins/polygon_3d_editor_plugin.cpp b/editor/plugins/polygon_3d_editor_plugin.cpp index 9defb4de9b..f4d97a5427 100644 --- a/editor/plugins/polygon_3d_editor_plugin.cpp +++ b/editor/plugins/polygon_3d_editor_plugin.cpp @@ -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; |