Only update shader wrapper when stroke_behind genuinely changes

This commit is contained in:
Grant Sanderson 2024-08-20 10:00:52 -05:00
parent 87ca6e56aa
commit b9645ad196

View file

@ -190,8 +190,9 @@ class VMobject(Mobject):
if background is not None: if background is not None:
for mob in self.get_family(recurse): for mob in self.get_family(recurse):
mob.stroke_behind = background if mob.stroke_behind != background:
mob.refresh_shader_wrapper_id() mob.refresh_shader_wrapper_id()
mob.stroke_behind = background
if flat is not None: if flat is not None:
self.set_flat_stroke(flat) self.set_flat_stroke(flat)