mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-23 06:41:32 +03:00
Remove highlight boxes associated with an old DOM node
This commit is contained in:
parent
377a883d3b
commit
89ff582c3d
@ -838,7 +838,9 @@ class Inspector(Container):
|
|||||||
for index, region in enumerate(regions):
|
for index, region in enumerate(regions):
|
||||||
show_box(f"clipped:{index}", region, "aquamarine")
|
show_box(f"clipped:{index}", region, "aquamarine")
|
||||||
# remove unused boxes
|
# remove unused boxes
|
||||||
for name, box in list(self._highlight_boxes[dom_node].items()):
|
# including boxes associated with an old dom_node
|
||||||
if box not in used_boxes:
|
for dom_node, boxes in list(self._highlight_boxes.items()):
|
||||||
box.remove()
|
for name, box in list(boxes.items()):
|
||||||
del self._highlight_boxes[dom_node][name]
|
if box not in used_boxes:
|
||||||
|
box.remove()
|
||||||
|
del self._highlight_boxes[dom_node][name]
|
Loading…
Reference in New Issue
Block a user