1
0
Fork 0

Show file when FileSystem is searched with UID

This commit is contained in:
kobewi 2025-02-12 23:00:28 +01:00
parent 23c1389f92
commit 34e278225b
1 changed files with 9 additions and 1 deletions

View File

@ -2645,7 +2645,15 @@ void FileSystemDock::_search_changed(const String &p_text, const Control *p_from
uncollapsed_paths_before_search = get_uncollapsed_paths();
}
const String searched_string = p_text.to_lower();
String searched_string = p_text.to_lower();
if (searched_string.begins_with("uid://")) {
ResourceUID::ID id = ResourceUID::get_singleton()->text_to_id(searched_string);
if (id != ResourceUID::INVALID_ID && ResourceUID::get_singleton()->has_id(id)) {
navigate_to_path(ResourceUID::get_singleton()->get_id_path(id));
return;
}
}
searched_tokens = searched_string.split(" ", false);
if (p_from == tree_search_box) {