Skip to content

Commit 1f42993

Browse files
committed
Correct bug of modifying self rather than self.local_group when text is blank
1 parent 957335c commit 1f42993

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_display_text/bitmap_label.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,9 @@ def _reset_text(
228228
0, # zero width with text == ""
229229
0, # zero height with text == ""
230230
)
231-
# Clear out any items in the self Group, in case this is an update to the bitmap_label
232-
for _ in self:
233-
self.pop(0)
231+
# Clear out any items in the self.local_group Group, in case this is an update to the bitmap_label
232+
for _ in self.local_group:
233+
self.local_group.pop(0)
234234

235235
else: # The text string is not empty, so create the Bitmap and TileGrid and
236236
# append to the self Group

0 commit comments

Comments
 (0)