summaryrefslogtreecommitdiff
path: root/tools/editor
diff options
context:
space:
mode:
authorAriel Manzur <ariel@okamstudio.com>2015-04-02 01:35:12 -0300
committerAriel Manzur <ariel@okamstudio.com>2015-04-02 01:35:12 -0300
commitebd743f7c215d65c877874cdf58b22437757fbc6 (patch)
tree83a7bd03bc199bfecfd95be45f47d24f60eb359a /tools/editor
parent7c1d516c013be7469b4bc4a8b6ef0b71381b160f (diff)
parented2a24ef21886e0327cf0215fb0211138547ad84 (diff)
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'tools/editor')
-rw-r--r--tools/editor/scene_tree_dock.cpp9
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();