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):
9191 # TODO(tannewt): Make this smarter when we can remove and add things into the middle
9292 # of a group.
9393 for _ in range (len (self .sprites ) - i ):
94- self .group .pop ()
94+ try :
95+ self .group .pop ()
96+ except IndexError :
97+ break
9598 first_different = False
9699 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 )
99105 self .group .append (face )
100106 self .sprites [i ] = face
101107 x += glyph ["shift" ][0 ]
You can’t perform that action at this time.
0 commit comments