diff pyink/domview.py @ 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 434f588fcde4
children cbcb91b196fa
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