Fix Theme type group naming in the inspector
This commit is contained in:
parent
83d2673772
commit
197be78bc5
|
@ -198,7 +198,15 @@ void Theme::_get_property_list(List<PropertyInfo> *p_list) const {
|
||||||
|
|
||||||
// Sort and store properties.
|
// Sort and store properties.
|
||||||
list.sort();
|
list.sort();
|
||||||
|
String prev_type;
|
||||||
for (const PropertyInfo &E : list) {
|
for (const PropertyInfo &E : list) {
|
||||||
|
// Add groups for types so that their names are left unchanged in the inspector.
|
||||||
|
String current_type = E.name.get_slice("/", 0);
|
||||||
|
if (prev_type != current_type) {
|
||||||
|
p_list->push_back(PropertyInfo(Variant::NIL, current_type, PROPERTY_HINT_NONE, current_type + "/", PROPERTY_USAGE_GROUP));
|
||||||
|
prev_type = current_type;
|
||||||
|
}
|
||||||
|
|
||||||
p_list->push_back(E);
|
p_list->push_back(E);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue