Your code indentation is a little off (top line should be un-indented?), so I'll summarize your code in words just to confirm I understand what is happening.
You call self.animate()
. This method creates an animation, and appends it to a list, self.animations
. You iterate over this list and start the animations. You start a timer (with a 1 second timeout) which calls self.animate()
.
The problem arises because self.animations
grows by one element each time you call self.animate()
. So the old animation instances are still in the list the next time the method is called. You are iterating over the entire list to start the animations, so you are calling animator.timeLine().start()
multiple times on a animation.
Removing the call to the timer prevents the self.animation()
method from running more than once, so you don't ever run into the problem when you comment out that line.