diff options
-rw-r--r-- | scene/resources/packed_scene.cpp | 2 | ||||
-rw-r--r-- | tools/editor/scene_tree_editor.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 43196a43d4..2377d22007 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -226,7 +226,7 @@ Node *SceneState::instance(bool p_gen_edit_state) const { node->add_to_group( snames[ n.groups[j] ], true ); } - if (n.instance>=0 || n.type!=TYPE_INSTANCED) { + if (n.instance>=0 || n.type!=TYPE_INSTANCED || i==0) { //if node was not part of instance, must set it's name, parenthood and ownership if (i>0) { if (parent) { diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp index ba5cc7568b..45eecacb6b 100644 --- a/tools/editor/scene_tree_editor.cpp +++ b/tools/editor/scene_tree_editor.cpp @@ -230,7 +230,7 @@ void SceneTreeEditor::_add_nodes(Node *p_node,TreeItem *p_parent) { return; } } else { - part_of_subscene = get_scene_node()->get_scene_inherited_state().is_valid() && get_scene_node()->get_scene_inherited_state()->find_node_by_path(get_scene_node()->get_path_to(p_node))>=0; + part_of_subscene = p_node!=get_scene_node() && get_scene_node()->get_scene_inherited_state().is_valid() && get_scene_node()->get_scene_inherited_state()->find_node_by_path(get_scene_node()->get_path_to(p_node))>=0; } TreeItem *item = tree->create_item(p_parent); |