summaryrefslogtreecommitdiffstats
path: root/editor/property_selector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/property_selector.cpp')
-rw-r--r--editor/property_selector.cpp8
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;
}