Skip to content

Commit 89d5ed4

Browse files
camburd2chopan050
andauthored
Fixed infinite loop in OpenGL BackgroundRectangle.get_color() (#3732)
Co-authored-by: Francisco Manríquez Novoa <[email protected]>
1 parent 82ff488 commit 89d5ed4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

manim/mobject/opengl/opengl_vectorized_mobject.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ def match_style(self, vmobject, recurse=True):
324324
vmobject_style = vmobject.get_style()
325325
if config.renderer == RendererType.OPENGL:
326326
vmobject_style["stroke_width"] = vmobject_style["stroke_width"][0][0]
327+
vmobject_style["fill_opacity"] = self.get_fill_opacity()
327328
self.set_style(**vmobject_style, recurse=False)
328329
if recurse:
329330
# Does its best to match up submobject lists, and
@@ -405,7 +406,7 @@ def get_stroke_opacity(self):
405406
return self.get_stroke_opacities()[0]
406407

407408
def get_color(self):
408-
if self.has_stroke():
409+
if not self.has_fill():
409410
return self.get_stroke_color()
410411
return self.get_fill_color()
411412

0 commit comments

Comments
 (0)