From f277dfc22796836f2c70d30fbf3cb04d80c7351f Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 17 Mar 2024 08:41:30 +0100 Subject: [PATCH] Don't use icons and don't sort in EditorQuickOpen for some easy speed gains. --- editor/quick_open.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp index 7797b5808..f9b2daa9b 100644 --- a/editor/quick_open.cpp +++ b/editor/quick_open.cpp @@ -158,8 +158,8 @@ void EditorQuickOpen::_parse_fs(EditorFileSystemDirectory *efsd, Vector> pair; pair.first = file; - StringName icon_name = search_options->has_theme_icon(file_type, ei) ? file_type : ot; - pair.second = search_options->get_theme_icon(icon_name, ei); + //StringName icon_name = search_options->has_theme_icon(file_type, ei) ? file_type : ot; + //pair.second = search_options->get_theme_icon(icon_name, ei); list.push_back(pair); // Stop testing base types as soon as we got a match. @@ -207,15 +207,16 @@ void EditorQuickOpen::_update_search() { search_options->clear(); TreeItem *root = search_options->create_item(); EditorFileSystemDirectory *efsd = EditorFileSystem::get_singleton()->get_filesystem(); + Vector>> list; _parse_fs(efsd, list); - list = _sort_fs(list); + //list = _sort_fs(list); for (int i = 0; i < list.size(); i++) { TreeItem *ti = search_options->create_item(root); ti->set_text(0, list[i].first); - ti->set_icon(0, list[i].second); + //ti->set_icon(0, list[i].second); } if (root->get_children()) {