This commit is contained in:
Will McGugan
2023-02-13 15:12:02 +00:00
parent c7e5ac14fb
commit 4cdc139853
2 changed files with 4 additions and 4 deletions

View File

@@ -515,7 +515,7 @@ class DOMNode(MessagePump):
tree = Tree(render_info(self)) tree = Tree(render_info(self))
def add_children(tree, node): def add_children(tree, node):
for child in node.children_view: for child in node.children:
info = render_info(child) info = render_info(child)
branch = tree.add(info) branch = tree.add(info)
if tree.children: if tree.children:
@@ -557,7 +557,7 @@ class DOMNode(MessagePump):
tree = Tree(render_info(self)) tree = Tree(render_info(self))
def add_children(tree, node): def add_children(tree, node):
for child in node.children_view: for child in node.children:
info = render_info(child) info = render_info(child)
css = child.styles.css css = child.styles.css
if css: if css:
@@ -571,7 +571,7 @@ class DOMNode(MessagePump):
), ),
) )
branch = tree.add(info) branch = tree.add(info)
if tree.children_view: if tree.children:
add_children(branch, child) add_children(branch, child)
add_children(tree, self) add_children(tree, self)

View File

@@ -104,7 +104,7 @@ async def test_screens():
app.push_screen("screen3") app.push_screen("screen3")
assert app.screen_stack == [screen2, screen3] assert app.screen_stack == [screen2, screen3]
assert app.screen is screen3 assert app.screen is screen3
# Only the current screen is in children_view # Only the current screen is in children
assert app.children == (screen3,) assert app.children == (screen3,)
# Pop a screen # Pop a screen