Merge pull request #35526 from nekomatata/inspector-update-rename-node

Fixed Inspector update when a node is renamed
This commit is contained in:
Rémi Verschelde 2020-01-24 21:52:12 +01:00 committed by GitHub
commit 98e5134059
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1765,6 +1765,8 @@ void EditorNode::_edit_current() {
return;
}
Object *prev_inspected_object = get_inspector()->get_edited_object();
bool capitalize = bool(EDITOR_GET("interface/inspector/capitalize_properties"));
bool disable_folding = bool(EDITOR_GET("interface/inspector/disable_folding"));
bool is_resource = current_obj->is_class("Resource");
@ -1856,6 +1858,11 @@ void EditorNode::_edit_current() {
inspector_dock->update(NULL);
}
if (current_obj == prev_inspected_object) {
// Make sure inspected properties are restored.
get_inspector()->update_tree();
}
inspector_dock->set_warning(editable_warning);
if (get_inspector()->is_capitalize_paths_enabled() != capitalize) {