diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-01-24 21:52:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-24 21:52:12 +0100 |
commit | 98e513405924f5f2a7590ff3786cad6a14ff7be2 (patch) | |
tree | aa86fa8fd96e62ba15f5ed2edf7eab2a727c3649 /editor | |
parent | c96f08dc8620491954960a1af6a852dcf2c02f09 (diff) | |
parent | 9c4a6cf7457fd6fa60929496a52908b8a77dffbd (diff) |
Merge pull request #35526 from nekomatata/inspector-update-rename-node
Fixed Inspector update when a node is renamed
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_node.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index c5b67eb971..dd15910d09 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -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) { |