summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-04-19 10:38:56 +0200
committerGitHub <noreply@github.com>2021-04-19 10:38:56 +0200
commitf41e7779fd3672c9da43460408f42bf06a3d803f (patch)
treeaa6080ea15fc3270d3437d32fad94d78d5b25aba
parent698c7d26f9c9509e3464e321bad6b0bacb6bb073 (diff)
parent9eb3546f38621b068c736d335d8926897b486175 (diff)
Merge pull request #47611 from Bhu1-V/PR/instance-scene-fix
-rw-r--r--editor/scene_tree_dock.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 5e6ebc22a3..a6d1a118b8 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -140,7 +140,11 @@ void SceneTreeDock::instance_scenes(const Vector<String> &p_files, Node *p_paren
parent = scene_tree->get_selected();
}
- if (!parent || !edited_scene) {
+ if (!parent) {
+ parent = edited_scene;
+ }
+
+ if (!parent) {
if (p_files.size() == 1) {
accept->set_text(TTR("No parent to instance a child at."));
} else {