Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better FilterTree checkbox handling #388

Merged
merged 2 commits into from
May 17, 2024
Merged

Conversation

mlopatkin
Copy link
Owner

fixes #384, fixes #385, fixes #386

mlopatkin added 2 commits May 17, 2024 18:57
Edit mode has assumptions about the selection mode which are hard to
overcome, and, potentially, may cause other issues. This CL changes
toggle handling to a solution that just tracks clicks on checkboxes.

There is an extra layout to determine where checkbox is, but it should
be fast and only happen for the filter being toggled - not that editor
solution is free from this as well.

Another crucial piece is to use mutable tree nodes in the tree model.
The selection handling keeps track of some TreePath instances and
doesn't update them when the underlying model changes. Immutable filter
instances were part of these TreePath, so enabling/disabling the filter
(which replaces the immutable instance in the model) rendered these
paths invalid, breaking selection tracking.

Issue: fixes #384, fixes #385, fixes #386
Before we were only checking the position when releasing the button.

Issue: n/a
@mlopatkin mlopatkin added this to the 0.23 milestone May 17, 2024
@mlopatkin mlopatkin self-assigned this May 17, 2024
@mlopatkin mlopatkin merged commit f808348 into master May 17, 2024
2 checks passed
@mlopatkin mlopatkin deleted the ml/better-filter-tree-checkbox branch May 17, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant