changeset 1282:1ac921a6bd9a

When we delete frame in tween, we should adjust the end only. If we delete the first frame, the whole scene is deleted.
author wycc
date Fri, 14 Jan 2011 00:36:50 +0800
parents e12472f8eef3
children a6aba785656e
files pyink/domview.py
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pyink/domview.py	Fri Jan 14 00:02:11 2011 +0800
+++ b/pyink/domview.py	Fri Jan 14 00:36:50 2011 +0800
@@ -706,13 +706,18 @@
 	    
 	    if end < frame_idx:
 		continue
-	    
+
 	    if start > last_rm:	# this scene is at right side
 		self.chg_scene_node(scene_node,
 				    start=(start - num),
 				    end=(end - num))
+	    elif start >= frame_idx:
+	        self.rm_scene_node_n_group(scene_node)
+	        pass
 	    else:	 # this scene is covered by removing range
-		self.rm_scene_node_n_group(scene_node)
+		self.chg_scene_node(scene_node,
+				    start=start,
+				    end=(end - num))
 		pass
 	    pass
 	pass