# HG changeset patch # User Thinker K.F. Li # Date 1296389001 -28800 # Node ID 740b3239030e5b78c4116c5039cd55c25111d7fd # Parent ffbbd3aa218de39968484b5b207a6a681b8bc6a3 Clear dup group before running animation. User may change content of groups. TweenObject would not aware the changes if we don't clear the dup group before running animation. diff -r ffbbd3aa218d -r 740b3239030e pyink/MBScene.py --- a/pyink/MBScene.py Sun Jan 30 19:15:17 2011 +0800 +++ b/pyink/MBScene.py Sun Jan 30 20:03:21 2011 +0800 @@ -261,6 +261,17 @@ Execute the current animation till the last frame. """ if self.btnRun.get_label() == "Run": + # + # Make dup groups empty + # + nlayers = self._domviewui.get_layer_num() + for layer_idx in range(nlayers): + layer_dup = self._domviewui.get_layer_dup_group(layer_idx) + for child in layer_dup.childList(): + layer_dup.removeChild(child) + pass + pass + self.btnRun.set_label("Stop") tmout = 1000 / self.framerate self.last_update = glib.timeout_add(tmout, self.doRunNext)