Merge pull request #8304 from RandomShaper/reset-folded-on-reset-edit-children

Reset display folded for an instanced scene if editable children is toggled off
This commit is contained in:
Rémi Verschelde 2017-04-07 19:12:42 +02:00 committed by GitHub
commit 12b84eb9f4

View file

@ -2063,10 +2063,14 @@ void Node::set_editable_instance(Node *p_node, bool p_editable) {
ERR_FAIL_NULL(p_node);
ERR_FAIL_COND(!is_a_parent_of(p_node));
NodePath p = get_path_to(p_node);
if (!p_editable)
if (!p_editable) {
data.editable_instances.erase(p);
else
// Avoid this flag being needlessly saved;
// also give more visual feedback if editable children is reenabled
set_display_folded(false);
} else {
data.editable_instances[p] = true;
}
}
bool Node::is_editable_instance(Node *p_node) const {