aboutsummaryrefslogtreecommitdiff
path: root/editor/property_editor.cpp
diff options
context:
space:
mode:
authorRémi Verschelde2017-05-02 11:25:27 +0200
committerGitHub2017-05-02 11:25:27 +0200
commit82fa41bce3ec7fdd59cfc10f57d72fa092f48b27 (patch)
treed9f025aaa4a2ae32c5dc98b2936c0704a12e9e53 /editor/property_editor.cpp
parent28173ad35d72fad12b2810133a3c3d1827bdeeec (diff)
parent7b315dc666a7b03a9622e10fb79446b58170fba5 (diff)
downloadgodot-82fa41bce3ec7fdd59cfc10f57d72fa092f48b27.tar.gz
godot-82fa41bce3ec7fdd59cfc10f57d72fa092f48b27.tar.zst
godot-82fa41bce3ec7fdd59cfc10f57d72fa092f48b27.zip
Merge pull request #8541 from RandomShaper/opt-out-capitalization
Add setting to opt-out of capitalization in property inspectors
Diffstat (limited to 'editor/property_editor.cpp')
-rw-r--r--editor/property_editor.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index f0717f1e6..e2733037a 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -2769,10 +2769,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"));
@@ -4298,9 +4295,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) {