aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/quick_open.cpp
diff options
context:
space:
mode:
authorGeorge Marques2016-06-12 13:43:31 -0300
committerGeorge Marques2016-06-12 14:53:03 -0300
commit68868aabc6f27a8facd8fe3ecb5719bc50f0f3f4 (patch)
tree6f5d9ec78f4f3f20a22a532f26c67c88c2b10ef6 /tools/editor/quick_open.cpp
parenta6c37d2b5d058d3bad2a942d965564c5054424c5 (diff)
downloadgodot-68868aabc6f27a8facd8fe3ecb5719bc50f0f3f4.tar.gz
godot-68868aabc6f27a8facd8fe3ecb5719bc50f0f3f4.tar.zst
godot-68868aabc6f27a8facd8fe3ecb5719bc50f0f3f4.zip
Diffstat (limited to 'tools/editor/quick_open.cpp')
-rw-r--r--tools/editor/quick_open.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/editor/quick_open.cpp b/tools/editor/quick_open.cpp
index 72059c264..fc2a2241a 100644
--- a/tools/editor/quick_open.cpp
+++ b/tools/editor/quick_open.cpp
@@ -126,7 +126,7 @@ void EditorQuickOpen::_parse_fs(EditorFileSystemDirectory *efsd) {
path+="/";
if (path!="res://") {
path=path.substr(6,path.length());
- if (path.findn(search_box->get_text())!=-1) {
+ if (search_box->get_text().is_subsequence_ofi(path)) {
TreeItem *ti = search_options->create_item(root);
ti->set_text(0,path);
Ref<Texture> icon = get_icon("folder","FileDialog");
@@ -138,7 +138,7 @@ void EditorQuickOpen::_parse_fs(EditorFileSystemDirectory *efsd) {
String file = efsd->get_file_path(i);
file=file.substr(6,file.length());
- if (ObjectTypeDB::is_type(efsd->get_file_type(i),base_type) && (search_box->get_text()=="" || file.findn(search_box->get_text())!=-1)) {
+ if (ObjectTypeDB::is_type(efsd->get_file_type(i),base_type) && (search_box->get_text().is_subsequence_ofi(file))) {
TreeItem *ti = search_options->create_item(root);
ti->set_text(0,file);