mirror of
https://github.com/1j01/textual-paint.git
synced 2025-01-09 00:28:08 +03:00
Fix removing old highlight boxes
It was clearning (replacing) the dictionary, and thus losing track of old highlights that should be removed.
This commit is contained in:
parent
79ae7e1b7b
commit
c2ddf4b88e
@ -798,7 +798,8 @@ class Inspector(Container):
|
||||
if "inspector_highlight" not in self.app.styles.layers: # type: ignore
|
||||
self.app.styles.layers += ("inspector_highlight",) # type: ignore
|
||||
|
||||
self._highlight_boxes[dom_node] = {}
|
||||
if dom_node not in self._highlight_boxes:
|
||||
self._highlight_boxes[dom_node] = {}
|
||||
used_boxes: list[Container] = []
|
||||
def show_box(name: str, region: Region, color: str) -> None:
|
||||
"""Draw a box to the screen."""
|
||||
|
Loading…
Reference in New Issue
Block a user