Skip to content

Commit 720615a

Browse files
committed
Merge pull request godotengine#95898 from KoBeWi/capital_of_nonexistent_properties
Remove references to deleted `capitalize_properties` setting
2 parents 2a98d8d + b314a91 commit 720615a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

editor/editor_property_name_processor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class EditorPropertyNameProcessor : public Node {
5151
StringName _get_context(const String &p_name, const String &p_property, const StringName &p_class) const;
5252

5353
public:
54-
// Matches `interface/inspector/capitalize_properties` editor setting.
54+
// Matches `interface/inspector/default_property_name_style` editor setting.
5555
enum Style {
5656
STYLE_RAW,
5757
STYLE_CAPITALIZED,

editor/inspector_dock.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,14 @@ void InspectorDock::_menu_option_confirm(int p_option, bool p_confirmed) {
141141

142142
unique_resources_list_tree->clear();
143143
if (resource_propnames.size()) {
144-
TreeItem *root = unique_resources_list_tree->create_item();
144+
const EditorPropertyNameProcessor::Style name_style = inspector->get_property_name_style();
145145

146-
for (int i = 0; i < resource_propnames.size(); i++) {
147-
String propname = resource_propnames[i].replace("/", " / ");
146+
TreeItem *root = unique_resources_list_tree->create_item();
147+
for (const String &E : resource_propnames) {
148+
const String propname = EditorPropertyNameProcessor::get_singleton()->process_name(E, name_style);
148149

149150
TreeItem *ti = unique_resources_list_tree->create_item(root);
150-
ti->set_text(0, bool(EDITOR_GET("interface/inspector/capitalize_properties")) ? propname.capitalize() : propname);
151+
ti->set_text(0, propname);
151152
}
152153

153154
unique_resources_label->set_text(TTR("The following resources will be duplicated and embedded within this resource/object."));

0 commit comments

Comments
 (0)