Import Sub-Scene as root's child if no node is selected

This commit is contained in:
neikeq 2015-11-23 20:06:37 +01:00
parent d3529da1e4
commit 62b9659c41

View file

@ -1264,7 +1264,10 @@ void SceneTreeDock::import_subscene() {
void SceneTreeDock::_import_subscene() {
Node* parent = scene_tree->get_selected();
ERR_FAIL_COND(!parent);
if (!parent) {
parent = editor_data->get_edited_scene_root();
ERR_FAIL_COND(!parent);
}
import_subscene_dialog->move(parent,edited_scene);
editor_data->get_undo_redo().clear_history(); //no undo for now..