Ensure error-flash rect is fixed in frame

This commit is contained in:
Grant Sanderson 2022-12-29 20:18:19 -08:00
parent 8e3378f798
commit 7dde368eeb

View file

@ -261,10 +261,9 @@ class Scene(object):
shell.showtraceback((etype, evalue, tb), tb_offset=tb_offset)
if self.embed_error_sound:
os.system("printf '\a'")
self.play(VFadeInThenOut(
FullScreenRectangle().set_stroke(RED, 30).set_fill(opacity=0),
run_time=0.5,
))
rect = FullScreenRectangle().set_stroke(RED, 30).set_fill(opacity=0)
rect.fix_in_frame()
self.play(VFadeInThenOut(rect, run_time=0.5))
shell.set_custom_exc((Exception,), custom_exc)