Merge pull request #8303 from RandomShaper/reset-folded-on-reset-edit-children-2.1
Reset display folded for an instanced scene if editable children is toggled off (2.1)
This commit is contained in:
commit
990e8e00c7
@ -1357,10 +1357,14 @@ void Node::set_editable_instance(Node *p_node, bool p_editable) {
|
|||||||
ERR_FAIL_NULL(p_node);
|
ERR_FAIL_NULL(p_node);
|
||||||
ERR_FAIL_COND(!is_a_parent_of(p_node));
|
ERR_FAIL_COND(!is_a_parent_of(p_node));
|
||||||
NodePath p = get_path_to(p_node);
|
NodePath p = get_path_to(p_node);
|
||||||
if (!p_editable)
|
if (!p_editable) {
|
||||||
data.editable_instances.erase(p);
|
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;
|
data.editable_instances[p] = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Node::is_editable_instance(Node *p_node) const {
|
bool Node::is_editable_instance(Node *p_node) const {
|
||||||
|
Loading…
Reference in New Issue
Block a user