diff options
author | Franklin Sobrinho <franklin_gs@hotmail.com> | 2015-11-22 13:05:55 -0300 |
---|---|---|
committer | Franklin Sobrinho <franklin_gs@hotmail.com> | 2015-11-22 13:05:55 -0300 |
commit | e956677f442f2d427602d5dec76c33c7739f5680 (patch) | |
tree | 816735a1bd2a512229d2c16c4fdc8a937a254f6b | |
parent | bcf4aded9a2af5f9ab48f7f279ee2032d0833f16 (diff) |
Better PropertyEditor search
-rw-r--r-- | tools/editor/property_editor.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp index 7687791ca2..31393ebcbc 100644 --- a/tools/editor/property_editor.cpp +++ b/tools/editor/property_editor.cpp @@ -2433,10 +2433,19 @@ void PropertyEditor::update_tree() { if (capitalize_paths) name = name.camelcase_to_underscore().capitalize(); - if (use_filter && filter!="" && name.findn(filter)==-1) - continue; - String path=p.name.left( p.name.find_last("/") ) ; + + if (use_filter && filter!="") { + + String cat = path; + + if (capitalize_paths) + cat = cat.capitalize(); + + if (cat.findn(filter)==-1 && name.findn(filter)==-1) + continue; + } + //printf("property %s\n",p.name.ascii().get_data()); TreeItem * parent = get_parent_node(path,item_path,current_category?current_category:root ); //if (parent->get_parent()==root) |