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

LibGUI: Add missing on_toggle hook to TreeView

Alt+arrow toggles are now captured.
This commit is contained in:
thankyouverycool 2020-07-10 09:47:58 -04:00 committed by Andreas Kling
parent bd0a4cbbf9
commit e6ddc7e022

View file

@ -115,6 +115,8 @@ void TreeView::set_open_state_of_all_in_subtree(const ModelIndex& root, bool ope
int row_count = model()->row_count(root);
int column = model()->tree_column();
for (int row = 0; row < row_count; ++row) {
if (on_toggle)
on_toggle(root, open);
auto index = model()->index(row, column, root);
set_open_state_of_all_in_subtree(index, open);
}