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
commit e6ddc7e022
Notes: sideshowbarker 2024-07-19 04:59:27 +09:00

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);
}