add enumerate
This commit is contained in:
parent
1f5df5b927
commit
bca17c30b6
1 changed files with 2 additions and 4 deletions
|
|
@ -154,16 +154,14 @@ class AnimationGroup:
|
|||
|
||||
# improve performance of non-synced animations by only calling show on the last member
|
||||
ret = False
|
||||
pos = 1
|
||||
num_members = len(self._members)
|
||||
for item in self._members:
|
||||
if pos == num_members:
|
||||
for index, item in enumerate(self._members):
|
||||
if index == num_members - 1:
|
||||
if item.animate(show):
|
||||
ret = True
|
||||
else:
|
||||
if item.animate(False):
|
||||
ret = True
|
||||
pos += 1
|
||||
return ret
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Reference in a new issue