diff options
author | Jelle Raaijmakers <jelle@gmta.nl> | 2021-05-25 22:48:43 +0200 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-05-26 17:39:13 +0430 |
commit | 2c772d184882dbdce0ec532f59c87743819f2e0d (patch) | |
tree | fd6bb1a769d1cd18140204b9d1c079ce18babf18 /Userland/Applications/FileManager | |
parent | ebe38639bcd8aac5302f969747796d940c5ab20b (diff) | |
download | serenity-2c772d184882dbdce0ec532f59c87743819f2e0d.zip |
LibGUI/AbstractView: Remove `on_selection`
Since the introduction of multi-select, we have had both `on_selection`
and `on_selection_change`, the latter of which was only invoked when a
change in selection came in through the model.
This removes `AbstractView::on_selection` and replaces it usage with
the more explicit `on_selection_change` everywhere.
Diffstat (limited to 'Userland/Applications/FileManager')
-rw-r--r-- | Userland/Applications/FileManager/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Applications/FileManager/main.cpp b/Userland/Applications/FileManager/main.cpp index 61a7ddf8a7..9c7692724a 100644 --- a/Userland/Applications/FileManager/main.cpp +++ b/Userland/Applications/FileManager/main.cpp @@ -1049,7 +1049,8 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio } }; - tree_view.on_selection = [&](const GUI::ModelIndex& index) { + tree_view.on_selection_change = [&] { + const auto& index = tree_view.selection().first(); if (directories_model->m_previously_selected_index.is_valid()) directories_model->update_node_on_selection(directories_model->m_previously_selected_index, false); |