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

Fix the drawing of Tree lines in respect to things being selected #2482

Merged
merged 6 commits into from
May 4, 2023

Conversation

davep
Copy link
Contributor

@davep davep commented May 4, 2023

This PR fixes two distinct but overlapping issues with the drawing of lines with Tree.

  • Fixes an issue where the whole tree would not be marked as selected if show_root=True and the root node was selected.
  • Fixes an issue where the selected style wasn't applied when a Tree was first draw or first received focus.

To aid with the latter issue reactive.var has acquired an always_update parameter.

See #2397.

davep added 6 commits May 4, 2023 08:53
Rather than always start at the root, the code should start at the beginning
of the path.

See Textualize#2397.
Redux. I managed to commit the wrong thing last time; although it was using
this and this was done for that.
@davep davep added bug Something isn't working Task labels May 4, 2023
@davep davep linked an issue May 4, 2023 that may be closed by this pull request
@davep davep marked this pull request as ready for review May 4, 2023 13:46
Copy link
Contributor

@rodrigogiraoserrao rodrigogiraoserrao left a comment

Choose a reason for hiding this comment

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

🐍 🚀


### Changed

- The DataTable cursor is now scrolled into view when the cursor coordinate is changed programmatically https://github.com/Textualize/textual/issues/2459
- run_worker exclusive parameter is now `False` by default https://github.com/Textualize/textual/pull/2470
- Added `always_update` as an optional argument for `reactive.var`
Copy link
Contributor

Choose a reason for hiding this comment

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

😆 isn't an "Added" line a feature that was added?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Normally yes but really this just changes the behaviour of var rather than adds something new. Felt a bit grand to have it in the added section.

@davep davep merged commit 32fbdbd into Textualize:main May 4, 2023
@davep davep deleted the tree-lines-fix branch May 4, 2023 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Selecting the root of a Tree does not highlight descendants.
2 participants