mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Until now the Tree.NodeExpanded and Tree.NodeCollapsed messages were only sent out when changes were made to the tree by user interaction. This meant that if any changes were made with the TreeNode expand, expand_all, collapse, collapse_all, toggle or toggle_all API calls no messages would be sent. This PR corrects this. The work here is, in part, required for #2456 (DirectoryTree lazy-loads directory information on node expansion so if someone is expanding nodes under code control the DirectoryTree never gets to know that it should load a directory's content) and will build on #1644, essentially adding a missing aspect to the latter PR.