Skip to content

Commit 348ee20

Browse files
committed
[EditorFileDialog] Do not update file selection on filter change if nothing was previously selected.
1 parent fafc073 commit 348ee20

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

editor/gui/editor_file_dialog.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,9 +1504,11 @@ void EditorFileDialog::_filter_changed(const String &p_text) {
15041504
search_string = p_text;
15051505
invalidate();
15061506

1507-
item_list->deselect_all();
1508-
if (item_list->get_item_count() > 0) {
1509-
item_list->call_deferred("select", 0);
1507+
if (item_list->get_selected_items().size() > 0) {
1508+
item_list->deselect_all();
1509+
if (item_list->get_item_count() > 0) {
1510+
item_list->call_deferred("select", 0);
1511+
}
15101512
}
15111513
}
15121514

0 commit comments

Comments
 (0)