1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-04 17:04:49 +00:00

Fix ownership when pasting non root with child nodes

(cherry picked from commit 8d39e4b14e)
This commit is contained in:
AeioMuch
2025-03-07 15:57:57 +01:00
committed by Rémi Verschelde
parent 87f75e7785
commit c1563b6500

View File

@@ -4268,7 +4268,7 @@ List<Node *> SceneTreeDock::paste_nodes(bool p_paste_as_sibling) {
// and added to the node_clipboard_edited_scene_owned list.
if (d != dup && E2.key->get_owner() == nullptr) {
if (node_clipboard_edited_scene_owned.find(const_cast<Node *>(E2.key))) {
ur->add_do_method(d, "set_owner", edited_scene);
ur->add_do_method(d, "set_owner", owner);
}
}
}