diff options
author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-05-06 10:26:10 +0200 |
---|---|---|
committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-05-08 12:48:01 +0200 |
commit | b4c6cc7d82d1fcdb3bed734c4e22c19e012c84df (patch) | |
tree | 9d29900c69482a9fc491f4c842e56028d9d049a9 /editor/property_selector.cpp | |
parent | 281fe39929303a8ef12e72ff7999b849bbe0678d (diff) | |
download | redot-engine-b4c6cc7d82d1fcdb3bed734c4e22c19e012c84df.tar.gz |
[Core] Add case-insensitive `String::containsn`
Diffstat (limited to 'editor/property_selector.cpp')
-rw-r--r-- | editor/property_selector.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp index eef68d918a..77ab629ba6 100644 --- a/editor/property_selector.cpp +++ b/editor/property_selector.cpp @@ -190,7 +190,7 @@ void PropertySelector::_update_search() { continue; } - if (!search_box->get_text().is_empty() && E.name.findn(search_text) == -1) { + if (!search_box->get_text().is_empty() && !E.name.containsn(search_text)) { continue; } @@ -203,7 +203,7 @@ void PropertySelector::_update_search() { item->set_metadata(0, E.name); item->set_icon(0, type_icons[E.type]); - if (!found && !search_box->get_text().is_empty() && E.name.findn(search_text) != -1) { + if (!found && !search_box->get_text().is_empty() && E.name.containsn(search_text)) { item->select(0); found = true; } @@ -281,7 +281,7 @@ void PropertySelector::_update_search() { continue; } - if (!search_box->get_text().is_empty() && name.findn(search_text) == -1) { + if (!search_box->get_text().is_empty() && !name.containsn(search_text)) { continue; } @@ -330,7 +330,7 @@ void PropertySelector::_update_search() { item->set_metadata(0, name); item->set_selectable(0, true); - if (!found && !search_box->get_text().is_empty() && name.findn(search_text) != -1) { + if (!found && !search_box->get_text().is_empty() && name.containsn(search_text)) { item->select(0); found = true; } |