You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
[Core] Add case-insensitive String::containsn
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user