diff options
author | Yuri Sizov <yuris@humnom.net> | 2023-03-07 18:41:54 +0100 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-03-07 18:41:54 +0100 |
commit | f68eb4a96711139d58d3f676d52576f1acb9c94e (patch) | |
tree | e1d2e04b56f633a5371b9962f65ff725f7accfb6 | |
parent | 013a45706897af989703b944c7cd5f4f58a6c060 (diff) | |
download | redot-engine-f68eb4a96711139d58d3f676d52576f1acb9c94e.tar.gz |
Update property keying state without a full Inspector rebuild
-rw-r--r-- | editor/editor_inspector.cpp | 12 | ||||
-rw-r--r-- | editor/editor_inspector.h | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index bc0a876c7c..66e5873ff9 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -3370,7 +3370,17 @@ void EditorInspector::set_keying(bool p_active) { return; } keying = p_active; - update_tree(); + _keying_changed(); +} + +void EditorInspector::_keying_changed() { + for (const KeyValue<StringName, List<EditorProperty *>> &F : editor_property_map) { + for (EditorProperty *E : F.value) { + if (E) { + E->set_keying(keying); + } + } + } } void EditorInspector::set_read_only(bool p_read_only) { diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index 01231108d8..76fe929ce4 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -521,6 +521,8 @@ class EditorInspector : public ScrollContainer { void _changed_callback(); void _edit_request_change(Object *p_object, const String &p_prop); + void _keying_changed(); + void _filter_changed(const String &p_text); void _parse_added_editors(VBoxContainer *current_vbox, EditorInspectorSection *p_section, Ref<EditorInspectorPlugin> ped); |