Allow folding in sub-inspectors in Array and Dictionary editors
This commit is contained in:
parent
15740c37a3
commit
4e469886e8
1 changed files with 2 additions and 0 deletions
|
@ -347,6 +347,7 @@ void EditorPropertyArray::update_property() {
|
||||||
prop->set_object_and_property(object.ptr(), prop_name);
|
prop->set_object_and_property(object.ptr(), prop_name);
|
||||||
prop->set_label(itos(i + offset));
|
prop->set_label(itos(i + offset));
|
||||||
prop->set_selectable(false);
|
prop->set_selectable(false);
|
||||||
|
prop->set_use_folding(is_using_folding());
|
||||||
prop->connect("property_changed", callable_mp(this, &EditorPropertyArray::_property_changed));
|
prop->connect("property_changed", callable_mp(this, &EditorPropertyArray::_property_changed));
|
||||||
prop->connect("object_id_selected", callable_mp(this, &EditorPropertyArray::_object_id_selected));
|
prop->connect("object_id_selected", callable_mp(this, &EditorPropertyArray::_object_id_selected));
|
||||||
prop->set_h_size_flags(SIZE_EXPAND_FILL);
|
prop->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||||
|
@ -1006,6 +1007,7 @@ void EditorPropertyDictionary::update_property() {
|
||||||
} else {
|
} else {
|
||||||
EditorPropertyResource *editor = memnew(EditorPropertyResource);
|
EditorPropertyResource *editor = memnew(EditorPropertyResource);
|
||||||
editor->setup(object.ptr(), prop_name, "Resource");
|
editor->setup(object.ptr(), prop_name, "Resource");
|
||||||
|
editor->set_use_folding(is_using_folding());
|
||||||
prop = editor;
|
prop = editor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue