1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:48:11 +00:00

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.
This commit is contained in:
Andreas Kling 2020-12-28 20:14:17 +01:00
parent 207ecf454a
commit f7116bba43
8 changed files with 31 additions and 25 deletions

View file

@ -160,7 +160,6 @@ void CellTypeDialog::setup_tabs(GUI::TabWidget& tabs, const Vector<Position>& po
auto& type_list = left_side.add<GUI::ListView>();
type_list.set_model(*GUI::ItemListModel<String>::create(g_types));
type_list.set_multi_select(false);
type_list.set_should_hide_unnecessary_scrollbars(true);
type_list.on_selection = [&](auto& index) {
if (!index.is_valid()) {