mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Add checks for setting submobjects with existing list
This commit is contained in:
parent
eeadbe4542
commit
47672d3b1e
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue