mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 11:09:18 +00:00
LibGUI: Add missing on_toggle hook to TreeView
Alt+arrow toggles are now captured.
This commit is contained in:
parent
bd0a4cbbf9
commit
e6ddc7e022
Notes:
sideshowbarker
2024-07-19 04:59:27 +09:00
Author: https://github.com/thankyouverycool
Commit: e6ddc7e022
Pull-request: https://github.com/SerenityOS/serenity/pull/2752
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue