# HG changeset patch # User Thinker K.F. Li # Date 1293763387 -28800 # Node ID 416e41952b764da1c0e254ec4d1b809eed536f86 # Parent ec1ea8555911a9a02651e04ed38b81ba0e33f705 Fix issue that pyink does not switch current layer to the new key scene. - After insert a new key scene, pyink does switch current layer to the new scene. It is supposed to have. - calls selectSceneObject() in doInsertKeyScene(). diff -r ec1ea8555911 -r 416e41952b76 pyink/MBScene.py --- a/pyink/MBScene.py Fri Dec 31 10:29:21 2010 +0800 +++ b/pyink/MBScene.py Fri Dec 31 10:43:07 2010 +0800 @@ -660,9 +660,9 @@ pass pass - def selectSceneObject(self, frameline, nth): + def selectSceneObject(self, frameline, frame_idx): try: - start, stop, tween_type = frameline.get_frame_block(nth - 1) + start, stop, tween_type = frameline.get_frame_block(frame_idx) except: return @@ -854,14 +854,15 @@ self.last_line.node.appendChild(ns) return ns - def doEditScene(self,w): + def doEditScene(self, w): self.setCurrentScene(self.last_frame+1) - self.selectSceneObject(self.last_line,self.last_frame+1) + self.selectSceneObject(self.last_line,self.last_frame) pass def doInsertKeyScene(self,w): self.lockui=True self.insertKeyScene() + self.selectSceneObject(self.last_line, self.last_frame) self.lockui=False # self.grid.show_all() return