diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2015-11-23 20:27:51 +0100 |
---|---|---|
committer | Rémi Verschelde <remi@verschelde.fr> | 2015-11-23 20:27:51 +0100 |
commit | 17a97b7bdfbf556e218103d476c3e31a4f1c0be7 (patch) | |
tree | a9164a248998b2a9b3fe539ad20e5a461fdee5dd | |
parent | 19a8f9b74d9ef7a4e2e9f5b1d1333995e2384943 (diff) | |
parent | 62b9659c4164cdc9b80aa7f1ce83065efde1c025 (diff) |
Merge pull request #2894 from neikeq/import_subscene_patch
Import Sub-Scene as root's child if no node is selected
-rw-r--r-- | tools/editor/scene_tree_dock.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp index 0cafe7459b..8b5bf8c1e1 100644 --- a/tools/editor/scene_tree_dock.cpp +++ b/tools/editor/scene_tree_dock.cpp @@ -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.. |