Skip to content

Commit

Permalink
Don't display empty Class Properties in feature profile
Browse files Browse the repository at this point in the history
(cherry picked from commit d9d12cd)
  • Loading branch information
timothyqiu authored and akien-mga committed Feb 11, 2022
1 parent 52e0613 commit e5fd6a5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion editor/editor_feature_profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:"));

Expand Down

0 comments on commit e5fd6a5

Please sign in to comment.