Remove duplicate items

This commit is contained in:
LinZeZhi 2023-06-29 10:18:44 +08:00
parent d8428585f8
commit c65b7242e4

View file

@ -119,10 +119,12 @@ class Animation(object):
# The surrounding scene typically handles # The surrounding scene typically handles
# updating of self.mobject. Besides, in # updating of self.mobject. Besides, in
# most cases its updating is suspended anyway # most cases its updating is suspended anyway
return list(filter( items = list(filter(
lambda m: m is not self.mobject, lambda m: m is not self.mobject,
self.get_all_mobjects() self.get_all_mobjects()
)) ))
items = list(set(items))
return items
def copy(self): def copy(self):
return deepcopy(self) return deepcopy(self)