Merge pull request #70618 from stmSi/fix-paste-from-clipboard-two-root-nodes-pointing-same-file

Editor: Fix `Paste From Clipboard` make new scene pointing to original scene file.
This commit is contained in:
Rémi Verschelde 2023-01-03 12:18:53 +01:00
commit 79d6cf7620
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 0 deletions

View File

@ -3217,6 +3217,7 @@ List<Node *> SceneTreeDock::paste_nodes() {
if (!paste_parent) {
paste_parent = dup;
owner = dup;
dup->set_scene_file_path(String()); // Make sure the scene path is empty, to avoid accidental references.
ur->add_do_method(EditorNode::get_singleton(), "set_edited_scene", dup);
} else {
ur->add_do_method(paste_parent, "add_child", dup, true);