You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Add subsequence search to tools
Add it to the following searches: - Create node. - Scene tree. - Inspector properties. - Classes list in help. - Quick open.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user