summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2022-02-07 18:55:17 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2022-02-07 18:55:17 +0800
commitd9d12cd352b0244cc95b5d4d928753a26a0515ea (patch)
tree7bd4fcd82d8ab4e29a78436d5a176af124cb4775 /editor
parent6f425242dcce95ae9993dca017f91e7bab2060d3 (diff)
Don't display empty Class Properties in feature profile
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_feature_profile.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp
index 1d73bdfa6e..2fc29c46af 100644
--- a/editor/editor_feature_profile.cpp
+++ b/editor/editor_feature_profile.cpp
@@ -592,7 +592,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 (const PropertyInfo &E : props) {
+ if (E.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:"));