We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbc0ea9 commit 85c9a7fCopy full SHA for 85c9a7f
adafruit_display_text/label.py
@@ -232,6 +232,7 @@ def _update_text(
232
i = 1
233
else:
234
i = 0
235
+ tilegrid_count = i
236
y_offset = int(
237
(
238
self._font.get_glyph(ord("M")).height
@@ -277,14 +278,16 @@ def _update_text(
277
278
x=position_x,
279
y=position_y,
280
)
- if i < len(self):
281
- self[i] = face
+ if tilegrid_count < len(self):
282
+ self[tilegrid_count] = face
283
284
self.append(face)
285
+ tilegrid_count += 1
286
x += glyph.shift_x
287
i += 1
288
# Remove the rest
- while len(self) > i:
289
+
290
+ while len(self) > tilegrid_count: # i:
291
self.pop()
292
self._text = new_text
293
self._boundingbox = (left, top, left + right, bottom - top)
0 commit comments