summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorFireForge <67974470+fire-forge@users.noreply.github.com>2022-03-25 21:22:46 -0500
committerFireForge <67974470+fire-forge@users.noreply.github.com>2022-03-28 14:02:06 -0500
commit88b09694e7dcca6211211162331d6467d10942d4 (patch)
tree5d562435e1d24659682cc8f453129fef25fae1da /editor
parent80d4f3521534eb042337d58d4c178b194074c286 (diff)
Fix inspector group name capitalization
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_inspector.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 483082858e..1449edb58f 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -2742,8 +2742,22 @@ void EditorInspector::update_tree() {
current_vbox->add_child(section);
sections.push_back(section);
- const String label = EditorPropertyNameProcessor::get_singleton()->process_name(component, property_name_style);
- const String tooltip = EditorPropertyNameProcessor::get_singleton()->process_name(component, EditorPropertyNameProcessor::get_tooltip_style(property_name_style));
+ String label;
+ String tooltip;
+
+ // Only process group label if this is not the group or subgroup.
+ if ((i == 0 && component == group) || (i == 1 && component == subgroup)) {
+ if (property_name_style == EditorPropertyNameProcessor::STYLE_LOCALIZED) {
+ label = TTRGET(component);
+ tooltip = component;
+ } else {
+ label = component;
+ tooltip = TTRGET(component);
+ }
+ } else {
+ label = EditorPropertyNameProcessor::get_singleton()->process_name(component, property_name_style);
+ tooltip = EditorPropertyNameProcessor::get_singleton()->process_name(component, EditorPropertyNameProcessor::get_tooltip_style(property_name_style));
+ }
Color c = sscolor;
c.a /= level;