Skip to content
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
8 changes: 5 additions & 3 deletions adafruit_display_text/bitmap_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ def _reset_text(
for _ in self._local_group:
self._local_group.pop(0)

# Free the bitmap and tilegrid since they are removed
self._bitmap = None
self._tilegrid = None

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

Expand Down Expand Up @@ -200,9 +204,7 @@ def _reset_text(
# Place the text into the Bitmap
self._place_text(
self._bitmap,
text
if self._label_direction != "RTL"
else "".join(reversed(self._text)),
text if self._label_direction != "RTL" else "".join(reversed(text)),
self._font,
self._padding_left - x_offset,
self._padding_top + y_offset,
Expand Down