diff options
author | Bhuvan Vemula <bhuvanvemula@gmail.com> | 2021-04-04 08:50:18 +0530 |
---|---|---|
committer | Bhuvan Vemula <bhuvanvemula@gmail.com> | 2021-04-17 19:16:18 +0530 |
commit | 9eb3546f38621b068c736d335d8926897b486175 (patch) | |
tree | 0b6aed4cbffc237f512879f171d703eb677be874 | |
parent | ed2f51b15fee22a35d2a975fd77a70fc291bd8de (diff) |
instance-scene: make parent as edited_scene if no parent selected.
-rw-r--r-- | editor/scene_tree_dock.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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<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 { |