From 9eb3546f38621b068c736d335d8926897b486175 Mon Sep 17 00:00:00 2001 From: Bhuvan Vemula Date: Sun, 4 Apr 2021 08:50:18 +0530 Subject: instance-scene: make parent as edited_scene if no parent selected. --- editor/scene_tree_dock.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 57d517b7e9..f1dd40dfb1 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -136,7 +136,11 @@ void SceneTreeDock::instance_scenes(const Vector &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 { -- cgit v1.2.3