Skip to content

Commit 6c04997

Browse files
committed
Merge pull request #100596 from bruvzg/flt_upd
[EditorFileDialog] Do not update file selection on filter change if nothing was previously selected.
2 parents ddf6e9e + 348ee20 commit 6c04997

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

editor/gui/editor_file_dialog.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -1511,9 +1511,11 @@ void EditorFileDialog::_filter_changed(const String &p_text) {
15111511
search_string = p_text;
15121512
invalidate();
15131513

1514-
item_list->deselect_all();
1515-
if (item_list->get_item_count() > 0) {
1516-
item_list->call_deferred("select", 0);
1514+
if (item_list->get_selected_items().size() > 0) {
1515+
item_list->deselect_all();
1516+
if (item_list->get_item_count() > 0) {
1517+
item_list->call_deferred("select", 0);
1518+
}
15171519
}
15181520
}
15191521

0 commit comments

Comments
 (0)