aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/property_editor.cpp
diff options
context:
space:
mode:
authormarynate2014-05-12 18:45:04 +0800
committermarynate2014-05-13 01:19:41 +0800
commit56d9faebab57000c8c82fb631dbf187c55604664 (patch)
tree1d8ae3ec9383339f8c38e99891e67d247e733d8a /tools/editor/property_editor.cpp
parent1b45a38fb531f448caf515d9423683c136ad4545 (diff)
downloadgodot-56d9faebab57000c8c82fb631dbf187c55604664.tar.gz
godot-56d9faebab57000c8c82fb631dbf187c55604664.tar.zst
godot-56d9faebab57000c8c82fb631dbf187c55604664.zip
Make String::right count from pos instead of pos+1
Diffstat (limited to '')
-rw-r--r--tools/editor/property_editor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp
index c2243bcc0..8c1620788 100644
--- a/tools/editor/property_editor.cpp
+++ b/tools/editor/property_editor.cpp
@@ -1941,7 +1941,7 @@ TreeItem *PropertyEditor::get_parent_node(String p_path,HashMap<String,TreeItem*
TreeItem *parent = get_parent_node( p_path.left( p_path.find_last("/") ),item_paths,root );
item = tree->create_item( parent );
- String name = (p_path.find("/")!=-1)?p_path.right( p_path.find_last("/") ):p_path;
+ 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
@@ -2099,7 +2099,7 @@ void PropertyEditor::update_tree() {
TreeItem * item = tree->create_item( parent );
- String name = (p.name.find("/")!=-1)?p.name.right( p.name.find_last("/") ):p.name;
+ String name = (p.name.find("/")!=-1)?p.name.right( p.name.find_last("/")+1 ):p.name;
if (level>0) {
item->set_custom_bg_color(0,col);