mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 19:46:21 +08:00
Add checks for setting submobjects with existing list
This commit is contained in:
@ -449,7 +449,9 @@ class Mobject(object):
|
||||
return self
|
||||
|
||||
def set_submobjects(self, submobject_list: list[Mobject]) -> Self:
|
||||
self.remove(*self.submobjects, reassemble=False)
|
||||
if self.submobjects == submobject_list:
|
||||
return self
|
||||
self.clear()
|
||||
self.add(*submobject_list)
|
||||
return self
|
||||
|
||||
|
Reference in New Issue
Block a user