Skip to content

Commit

Permalink
Fixed infinite loop in OpenGL BackgroundRectangle.get_color() (#3732)
Browse files Browse the repository at this point in the history
Co-authored-by: Francisco Manríquez Novoa <[email protected]>
  • Loading branch information
camburd2 and chopan050 authored Jun 21, 2024
1 parent 82ff488 commit 89d5ed4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion manim/mobject/opengl/opengl_vectorized_mobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ def match_style(self, vmobject, recurse=True):
vmobject_style = vmobject.get_style()
if config.renderer == RendererType.OPENGL:
vmobject_style["stroke_width"] = vmobject_style["stroke_width"][0][0]
vmobject_style["fill_opacity"] = self.get_fill_opacity()
self.set_style(**vmobject_style, recurse=False)
if recurse:
# Does its best to match up submobject lists, and
Expand Down Expand Up @@ -405,7 +406,7 @@ def get_stroke_opacity(self):
return self.get_stroke_opacities()[0]

def get_color(self):
if self.has_stroke():
if not self.has_fill():
return self.get_stroke_color()
return self.get_fill_color()

Expand Down

0 comments on commit 89d5ed4

Please sign in to comment.