diff options
author | Andreas Kling <kling@serenityos.org> | 2020-12-28 20:14:17 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-28 21:28:40 +0100 |
commit | f7116bba43cc36d6b6f0916a783d4f807c13af20 (patch) | |
tree | e3d8a4c633446306759dcd40ff54f441393a3bf0 /Libraries/LibGUI/FilePicker.cpp | |
parent | 207ecf454a34728474ca75e25c251d2f88b5cc12 (diff) | |
download | serenity-f7116bba43cc36d6b6f0916a783d4f807c13af20.zip |
LibGUI: Refactor AbstractView "multi select" mode into "selection mode"
There are three possible selection modes for a GUI::AbstractView.
- NoSelection
- SingleSelection
- MultiSelection
We don't enforce these modes fully yet, this patch mostly adds them in
place of the old "multi select" flag.
Diffstat (limited to 'Libraries/LibGUI/FilePicker.cpp')
-rw-r--r-- | Libraries/LibGUI/FilePicker.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibGUI/FilePicker.cpp b/Libraries/LibGUI/FilePicker.cpp index c6feda202b..6a9d28c7ec 100644 --- a/Libraries/LibGUI/FilePicker.cpp +++ b/Libraries/LibGUI/FilePicker.cpp @@ -123,7 +123,7 @@ FilePicker::FilePicker(Window* parent_window, Mode mode, Options options, const m_location_textbox->set_text(path); m_view = vertical_container.add<MultiView>(); - m_view->set_multi_select(m_mode == Mode::OpenMultiple); + m_view->set_selection_mode(m_mode == Mode::OpenMultiple ? GUI::AbstractView::SelectionMode::MultiSelection : GUI::AbstractView::SelectionMode::SingleSelection); m_view->set_model(SortingProxyModel::create(*m_model)); m_view->set_model_column(FileSystemModel::Column::Name); m_view->set_key_column_and_sort_order(GUI::FileSystemModel::Column::Name, GUI::SortOrder::Ascending); |