comparison pyink/MBScene.py @ 1159:e731a0eaa35f

Fix issue of chagne tween type when there is more than one tween block. - It always tween first tween block when there is more than one block on a timeline.
author Thinker K.F. Li <thinker@codemud.net>
date Tue, 28 Dec 2010 13:35:34 +0800
parents 3a891dccabd8
children 1a699dc00fa3
comparison
equal deleted inserted replaced
1158:1d1f2a1e43f6 1159:e731a0eaa35f
915 return 915 return
916 916
917 if self.last_line == None: 917 if self.last_line == None:
918 return 918 return
919 frameline = self.last_line 919 frameline = self.last_line
920 idx = self.last_frame
920 i = 0 921 i = 0
921 found = -1 922 found = -1
922 for start_idx, stop_idx, tween_type in frameline.get_frame_blocks(): 923 for start_idx, stop_idx, tween_type in frameline.get_frame_blocks():
923 if start_idx < stop_idx: 924 if start_idx <= idx and stop_idx >= idx:
924 n = self.tweenTypeSelector.get_active() 925 n = self.tweenTypeSelector.get_active()
925 new_tween_type = MBScene._frameline_tween_types[n] 926 new_tween_type = MBScene._frameline_tween_types[n]
926 self.last_line.set_tween_type(start_idx, new_tween_type) 927 self.last_line.set_tween_type(start_idx, new_tween_type)
927 self.update() 928 self.update()
928 break 929 break