[EditorFileDialog] Do not update file selection on filter change if nothing was previously selected.
This commit is contained in:
parent
fafc07335b
commit
348ee200f8
1 changed files with 5 additions and 3 deletions
|
|
@ -1504,9 +1504,11 @@ void EditorFileDialog::_filter_changed(const String &p_text) {
|
|||
search_string = p_text;
|
||||
invalidate();
|
||||
|
||||
item_list->deselect_all();
|
||||
if (item_list->get_item_count() > 0) {
|
||||
item_list->call_deferred("select", 0);
|
||||
if (item_list->get_selected_items().size() > 0) {
|
||||
item_list->deselect_all();
|
||||
if (item_list->get_item_count() > 0) {
|
||||
item_list->call_deferred("select", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue