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

ui.tree select/deselect, tick/untick programmatically #3476

Merged
merged 6 commits into from
Aug 12, 2024

Conversation

arunaseva
Copy link
Contributor

Link to the description:

#3436 (reply in thread)

Copy link
Contributor

@falkoschindler falkoschindler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request, @arunaseva!

I just reviewed your code and did some minor changes:

  • I changed select(None) to deselect the nodes instead of doing nothing. This feels more intuitive.
  • The code for untick() could be simplified a bit. We don't need to intersect before computing the difference.
  • The tests could be simplified with a label showing the current selection and tick list, resulting in rather readable should_contain statements.
  • Last but not least, I decided to split the select and tick demo. This reduces complexity and is more in line with the existing expand/collapse demo.

Let's merge into main! 🚀

@falkoschindler falkoschindler added the enhancement New feature or request label Aug 12, 2024
@falkoschindler falkoschindler added this to the 1.4.35 milestone Aug 12, 2024
@falkoschindler falkoschindler merged commit 1a044b2 into zauberzeug:main Aug 12, 2024
1 check passed
@arunaseva arunaseva deleted the tree-select-by-code branch August 15, 2024 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants