diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-03-31 17:57:43 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-03-31 17:57:43 -0300 |
commit | 33f24df786be621d5b7dab01c98daca4848b4816 (patch) | |
tree | d62e89114b2db4a9c15bad7634220bb96e434212 | |
parent | 7fc4059b1311afbf986f4b356bb93cd164ba829a (diff) | |
parent | 4883e2e887ca9ab6b939482c9889271cae3b047a (diff) |
Merge branch 'master' of https://github.com/okamstudio/godot
-rw-r--r-- | tools/editor/scene_tree_dock.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp index 2012d96664..84b34cf130 100644 --- a/tools/editor/scene_tree_dock.cpp +++ b/tools/editor/scene_tree_dock.cpp @@ -1059,14 +1059,15 @@ void SceneTreeDock::_create() { if (edited_scene) { - + // If root exists in edited scene parent = scene_tree->get_selected(); - ERR_FAIL_COND(!parent); - } else { + if( !parent ) + parent = edited_scene; + } else { + // If no root exist in edited scene parent = scene_root; ERR_FAIL_COND(!parent); - } Object *c = create_dialog->instance_selected(); |