File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -91,11 +91,17 @@ def _update_text(self, new_text):
91
91
# TODO(tannewt): Make this smarter when we can remove and add things into the middle
92
92
# of a group.
93
93
for _ in range (len (self .sprites ) - i ):
94
- self .group .pop ()
94
+ try :
95
+ self .group .pop ()
96
+ except IndexError :
97
+ break
95
98
first_different = False
96
99
if not first_different :
97
- face = displayio .TileGrid (glyph ["bitmap" ], pixel_shader = self .p ,
98
- position = (self ._x + x , self ._y + y + self .height - glyph ["bounds" ][1 ] - glyph ["bounds" ][3 ]))
100
+ position = (self ._x + x , self ._y + y + self .height - glyph ["bounds" ][1 ] - glyph ["bounds" ][3 ])
101
+ try :
102
+ face = displayio .TileGrid (glyph ["bitmap" ], pixel_shader = self .p , position = position )
103
+ except :
104
+ face = displayio .Sprite (glyph ["bitmap" ], pixel_shader = self .p , position = position )
99
105
self .group .append (face )
100
106
self .sprites [i ] = face
101
107
x += glyph ["shift" ][0 ]
You can’t perform that action at this time.
0 commit comments