Skip to content

Commit

Permalink
send hides
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Jul 17, 2024
1 parent c9bb137 commit 9ed0987
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/textual/_compositor.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,8 @@ def _arrange_root(
map: CompositorMap = {}
widgets: set[Widget] = set()
add_new_widget = widgets.add
invisible_widgets: set[Widget] = set()
add_new_invisible_widget = invisible_widgets.add
layer_order: int = 0

no_clip = size.region
Expand Down Expand Up @@ -623,6 +625,8 @@ def add_widget(

if visible:
add_new_widget(widget)
else:
add_new_invisible_widget(widget)
styles_offset = styles.offset
layout_offset = (
styles_offset.resolve(region.size, clip.size)
Expand Down Expand Up @@ -768,6 +772,7 @@ def add_widget(
True,
NULL_SPACING,
)
widgets -= invisible_widgets
return map, widgets

@property
Expand Down

0 comments on commit 9ed0987

Please sign in to comment.