Don't display empty Class Properties in feature profile

(cherry picked from commit d9d12cd352)
This commit is contained in:
Haoyu Qiu 2022-02-07 18:55:17 +08:00 committed by Rémi Verschelde
parent 52e0613638
commit e5fd6a5086
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -595,7 +595,15 @@ void EditorFeatureProfileManager::_class_list_item_selected() {
List<PropertyInfo> props;
ClassDB::get_property_list(class_name, &props, true);
if (props.size() > 0) {
bool has_editor_props = false;
for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
if (E->get().usage & PROPERTY_USAGE_EDITOR) {
has_editor_props = true;
break;
}
}
if (has_editor_props) {
TreeItem *properties = property_list->create_item(root);
properties->set_text(0, TTR("Class Properties:"));