mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-30 21:09:19 +01:00
Fix Theme type group naming in the inspector
(cherry picked from commit 197be78bc558aa90413bd0420c24736a989e5f0e)
This commit is contained in:
parent
3b49fd6c70
commit
04b2405843
@ -179,7 +179,15 @@ void Theme::_get_property_list(List<PropertyInfo> *p_list) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
list.sort();
|
list.sort();
|
||||||
|
String prev_type;
|
||||||
for (List<PropertyInfo>::Element *E = list.front(); E; E = E->next()) {
|
for (List<PropertyInfo>::Element *E = list.front(); E; E = E->next()) {
|
||||||
|
// Add groups for types so that their names are left unchanged in the inspector.
|
||||||
|
String current_type = E->get().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->get());
|
p_list->push_back(E->get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user