Merge pull request #70909 from TokageItLab/revert-improve-update_tree

Revert improve update tree
This commit is contained in:
Rémi Verschelde 2023-01-05 12:56:07 +01:00
commit d29193affe
No known key found for this signature in database
GPG Key ID: C3336907360768E1
3 changed files with 4 additions and 14 deletions

View File

@ -2586,7 +2586,7 @@ bool EditorInspector::_is_property_disabled_by_feature_profile(const StringName
return false; return false;
} }
void EditorInspector::_update_tree() { void EditorInspector::update_tree() {
//to update properly if all is refreshed //to update properly if all is refreshed
StringName current_selected = property_selected; StringName current_selected = property_selected;
int current_focusable = -1; int current_focusable = -1;
@ -3305,10 +3305,6 @@ void EditorInspector::_update_tree() {
} }
} }
void EditorInspector::update_tree() {
update_tree_pending = true;
}
void EditorInspector::update_property(const String &p_prop) { void EditorInspector::update_property(const String &p_prop) {
if (!editor_property_map.has(p_prop)) { if (!editor_property_map.has(p_prop)) {
return; return;
@ -3365,10 +3361,7 @@ void EditorInspector::set_keying(bool p_active) {
return; return;
} }
keying = p_active; keying = p_active;
// Propagate the keying state to its editor properties. update_tree();
Array args;
args.append(keying);
main_vbox->propagate_call(SNAME("set_keying"), args, true);
} }
void EditorInspector::set_read_only(bool p_read_only) { void EditorInspector::set_read_only(bool p_read_only) {
@ -3906,9 +3899,10 @@ void EditorInspector::_notification(int p_what) {
changing++; changing++;
if (update_tree_pending) { if (update_tree_pending) {
update_tree();
update_tree_pending = false; update_tree_pending = false;
pending.clear(); pending.clear();
_update_tree();
} else { } else {
while (pending.size()) { while (pending.size()) {
StringName prop = *pending.begin(); StringName prop = *pending.begin();

View File

@ -542,8 +542,6 @@ class EditorInspector : public ScrollContainer {
void _show_add_meta_dialog(); void _show_add_meta_dialog();
void _check_meta_name(const String &p_name); void _check_meta_name(const String &p_name);
void _update_tree();
protected: protected:
static void _bind_methods(); static void _bind_methods();
void _notification(int p_what); void _notification(int p_what);

View File

@ -4121,8 +4121,6 @@ void EditorPropertyResource::update_property() {
if (use_editor) { if (use_editor) {
// Open editor directly and hide other such editors which are currently open. // Open editor directly and hide other such editors which are currently open.
// The opened editor is the one that edits the sub-resource, so keying state will be toggled to false.
sub_inspector->set_keying(false);
_open_editor_pressed(); _open_editor_pressed();
if (is_inside_tree()) { if (is_inside_tree()) {
get_tree()->call_deferred(SNAME("call_group"), "_editor_resource_properties", "_fold_other_editors", this); get_tree()->call_deferred(SNAME("call_group"), "_editor_resource_properties", "_fold_other_editors", this);