diff options
| author | Rémi Verschelde | 2017-05-02 11:25:25 +0200 |
|---|---|---|
| committer | GitHub | 2017-05-02 11:25:25 +0200 |
| commit | dd5fd4fdacf0504ff26c773f29ae7a5aa419d88b (patch) | |
| tree | a3af7724350d20bd4fe62d2b4a85b641018a41d0 /editor/property_editor.cpp | |
| parent | fb8cee9af9a649d0458e65a02839f5a51a16cc79 (diff) | |
| parent | 9a0e08a35263ede46f7cacf9290ba1407f4eb733 (diff) | |
| download | godot-dd5fd4fdacf0504ff26c773f29ae7a5aa419d88b.tar.gz godot-dd5fd4fdacf0504ff26c773f29ae7a5aa419d88b.tar.zst godot-dd5fd4fdacf0504ff26c773f29ae7a5aa419d88b.zip | |
Merge pull request #8542 from RandomShaper/opt-out-capitalization-2.1
Add setting to opt-out of capitalization in property inspectors (2.1)
Diffstat (limited to '')
| -rw-r--r-- | editor/property_editor.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index c4aa2d921..e6a17b7be 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -2428,10 +2428,7 @@ TreeItem *PropertyEditor::get_parent_node(String p_path, HashMap<String, TreeIte item = tree->create_item(parent); String name = (p_path.find("/") != -1) ? p_path.right(p_path.find_last("/") + 1) : p_path; - if (capitalize_paths) - item->set_text(0, name.capitalize()); - else - item->set_text(0, name); + item->set_text(0, capitalize_paths ? name.capitalize() : name); item->set_tooltip(0, p_path); if (item->get_parent() != root) { item->set_icon(0, get_icon("Folder", "EditorIcons")); @@ -3832,9 +3829,15 @@ String PropertyEditor::get_selected_path() const { return ""; } -void PropertyEditor::set_capitalize_paths(bool p_capitalize) { +bool PropertyEditor::is_capitalize_paths_enabled() const { + + return capitalize_paths; +} + +void PropertyEditor::set_enable_capitalize_paths(bool p_capitalize) { capitalize_paths = p_capitalize; + update_tree_pending = true; } void PropertyEditor::set_autoclear(bool p_enable) { |
