Skip to content

Correct bug of modifying self rather than self.local_group when text … #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions adafruit_display_text/bitmap_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,10 @@ def _reset_text(
0, # zero width with text == ""
0, # zero height with text == ""
)
# Clear out any items in the self Group, in case this is an update to the bitmap_label
for _ in self:
self.pop(0)
# Clear out any items in the self.local_group Group, in case this is an
# update to the bitmap_label
for _ in self.local_group:
self.local_group.pop(0)

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