mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Take Tree.show_root into account when drawing guides
Rather than always start at the root, the code should start at the beginning of the path. See #2397.
This commit is contained in:
@@ -976,8 +976,8 @@ class Tree(Generic[TreeDataType], ScrollView, can_focus=True):
|
||||
"tree--guides-selected", partial=True
|
||||
)
|
||||
|
||||
hover = self.root._hover
|
||||
selected = self.root._selected and self.has_focus
|
||||
hover = line.path[0]._hover
|
||||
selected = line.path[0]._selected and self.has_focus
|
||||
|
||||
def get_guides(style: Style) -> tuple[str, str, str, str]:
|
||||
"""Get the guide strings for a given style.
|
||||
|
||||
Reference in New Issue
Block a user