Allow folding in sub-inspectors in Array and Dictionary editors

(cherry picked from commit 4e469886e803793c9c2dc7d402da8e9cf98343f9)
This commit is contained in:
FireForge 2022-06-14 23:23:59 -05:00 committed by Relintai
parent 10d3f0826e
commit 0609c362bc

View File

@ -402,6 +402,7 @@ void EditorPropertyArray::update_property() {
prop->set_object_and_property(object.ptr(), prop_name);
prop->set_label(itos(i + offset));
prop->set_selectable(false);
prop->set_use_folding(is_using_folding());
prop->connect("property_changed", this, "_property_changed");
prop->connect("object_id_selected", this, "_object_id_selected");
prop->set_h_size_flags(SIZE_EXPAND_FILL);
@ -1054,6 +1055,7 @@ void EditorPropertyDictionary::update_property() {
} else {
EditorPropertyResource *editor = memnew(EditorPropertyResource);
editor->setup(object.ptr(), prop_name, "Resource");
editor->set_use_folding(is_using_folding());
prop = editor;
}