1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:37:46 +00:00

LibGUI: Actually set the first allowed file extension list in FilePicker

Previously, the File Picker didn't activate the pre-selected filter.
This commit is contained in:
Karol Kosek 2023-05-09 18:33:47 +02:00 committed by Sam Atkins
parent e02cbd9daa
commit 3e12d84f0f

View file

@ -157,6 +157,7 @@ FilePicker::FilePicker(Window* parent_window, Mode mode, StringView filename, St
m_model->set_allowed_file_extensions((*m_allowed_file_types)[index.row()].extensions);
};
file_types_filters_combo->set_selected_index(0);
m_model->set_allowed_file_extensions((*m_allowed_file_types)[0].extensions);
} else {
auto* file_types_filter_label = widget->find_descendant_of_type_named<GUI::Label>("allowed_file_types_label");
auto& spacer = file_types_filter_label->parent_widget()->add<GUI::Widget>();