diff options
Diffstat (limited to 'scene/main/node.cpp')
| -rwxr-xr-x | scene/main/node.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 42e9cec217..cfee5066b4 100755 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -2063,10 +2064,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 { |