summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-03 12:18:53 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-03 12:18:53 +0100
commit79d6cf76206b1550610efe4b61791550ea9aa7d6 (patch)
tree232d5355ca770f6251be9d01960dbddb376cc3c1 /editor
parenta140d469d751f9d200cec937bb158e1c439358f5 (diff)
parentb2a398d2a5097b4c5f174f407aa4538f89bd1618 (diff)
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.
Diffstat (limited to 'editor')
-rw-r--r--editor/scene_tree_dock.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index f91b571118..60d3925cd6 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -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);