diff pyink/MBScene.py @ 1239:447cd3359cf2

Fix bug of mal-structured dup group - When a user changes tween type of a tween, the structure of dup group may not satisfy the requirement of new type. - It causes unexpected behavior. - It is fixed by checking structure and remove mal-structured ones.
author Thinker K.F. Li <thinker@codemud.net>
date Mon, 10 Jan 2011 11:45:13 +0800
parents 2febe4a301fa
children 84bcd398cccc
line wrap: on
line diff
--- a/pyink/MBScene.py	Mon Jan 10 11:45:13 2011 +0800
+++ b/pyink/MBScene.py	Mon Jan 10 11:45:13 2011 +0800
@@ -479,7 +479,7 @@
     def rm_scene_node_n_group(self, scene_node):
 	scene_group_id = scene_node.getAttribute('ref')
 	scene_group_node = self.get_node(scene_group_id)
-	scene_group_node.parent.removeChild(scene_group_node)
+	scene_group_node.parent().removeChild(scene_group_node)
 	
 	self._scenes_node.removeChild(scene_node)
 	pass
@@ -543,9 +543,9 @@
 	    for scene_node in layer.scenes:
 		scene_group_id = scene_node.getAttribute('ref')
 		scene_group_node = self.get_node(scene_group_id)
-		scene_group_node.parent.removeChild(scene_group_node)
+		scene_group_node.parent().removeChild(scene_group_node)
 		
-		scene_node.parent.removeChild(scene_node)
+		scene_node.parent().removeChild(scene_node)
 		pass
 	    pass