instance-scene: make parent as edited_scene if no parent selected.

This commit is contained in:
Bhuvan Vemula 2021-04-04 08:50:18 +05:30
parent ed2f51b15f
commit 9eb3546f38

View file

@ -136,7 +136,11 @@ void SceneTreeDock::instance_scenes(const Vector<String> &p_files, Node *p_paren
parent = scene_tree->get_selected(); parent = scene_tree->get_selected();
} }
if (!parent || !edited_scene) { if (!parent) {
parent = edited_scene;
}
if (!parent) {
if (p_files.size() == 1) { if (p_files.size() == 1) {
accept->set_text(TTR("No parent to instance a child at.")); accept->set_text(TTR("No parent to instance a child at."));
} else { } else {