Skip to content

Commit 037e85d

Browse files
authored
Fix lazy text objects re-initializing multiple times (#2644)
* Fix draw functions not initializing correctly - draw_debug was not calling init_deferred at all - draw was not checking if it was initialized already, making it very slow * Fix formatting * Remove unneeded init_deferred from draw functions
1 parent dfcc8a1 commit 037e85d

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

arcade/text.py

-2
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ def __init__(
276276
z: float = 0,
277277
**kwargs,
278278
):
279-
self._initialized = False
280279
self._arguments = dict(
281280
text=text,
282281
x=x,
@@ -645,7 +644,6 @@ def draw(self) -> None:
645644
instance. For information on how to do this, see
646645
:ref:`sprite_move_scrolling`.
647646
"""
648-
self._init_deferred()
649647
_draw_pyglet_label(self.label)
650648

651649
def draw_debug(

0 commit comments

Comments
 (0)