summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-16 14:57:21 +0200
committerGitHub <noreply@github.com>2022-05-16 14:57:21 +0200
commit0497b67bec0f545727e2e3c0a8b03d52be916b81 (patch)
treeeeffcf3cda29dad98dcb986e55308c00621c38e0 /scene
parentc41f62c3df85fd71539ae09bd97964e5e367d897 (diff)
parent197be78bc558aa90413bd0420c24736a989e5f0e (diff)
Merge pull request #60130 from fire-forge/theme-node-names
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/theme.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp
index 10806aef45..1e57933000 100644
--- a/scene/resources/theme.cpp
+++ b/scene/resources/theme.cpp
@@ -172,7 +172,15 @@ void Theme::_get_property_list(List<PropertyInfo> *p_list) const {
// Sort and store properties.
list.sort();
+ String prev_type;
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);
}
}