Mercurial > MadButterfly
comparison pyink/MBScene.py @ 1178:416e41952b76
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().
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Fri, 31 Dec 2010 10:43:07 +0800 |
parents | ec1ea8555911 |
children | b65df4f0d30a |
comparison
equal
deleted
inserted
replaced
1177:ec1ea8555911 | 1178:416e41952b76 |
---|---|
658 pass | 658 pass |
659 pass | 659 pass |
660 pass | 660 pass |
661 pass | 661 pass |
662 | 662 |
663 def selectSceneObject(self, frameline, nth): | 663 def selectSceneObject(self, frameline, frame_idx): |
664 try: | 664 try: |
665 start, stop, tween_type = frameline.get_frame_block(nth - 1) | 665 start, stop, tween_type = frameline.get_frame_block(frame_idx) |
666 except: | 666 except: |
667 return | 667 return |
668 | 668 |
669 scene_group = frameline.get_frame_data(start) | 669 scene_group = frameline.get_frame_data(start) |
670 self.enterGroup(scene_group) | 670 self.enterGroup(scene_group) |
852 ns.setAttribute("id",gid) | 852 ns.setAttribute("id",gid) |
853 ns.setAttribute("inkscape:groupmode","layer") | 853 ns.setAttribute("inkscape:groupmode","layer") |
854 self.last_line.node.appendChild(ns) | 854 self.last_line.node.appendChild(ns) |
855 return ns | 855 return ns |
856 | 856 |
857 def doEditScene(self,w): | 857 def doEditScene(self, w): |
858 self.setCurrentScene(self.last_frame+1) | 858 self.setCurrentScene(self.last_frame+1) |
859 self.selectSceneObject(self.last_line,self.last_frame+1) | 859 self.selectSceneObject(self.last_line,self.last_frame) |
860 pass | 860 pass |
861 | 861 |
862 def doInsertKeyScene(self,w): | 862 def doInsertKeyScene(self,w): |
863 self.lockui=True | 863 self.lockui=True |
864 self.insertKeyScene() | 864 self.insertKeyScene() |
865 self.selectSceneObject(self.last_line, self.last_frame) | |
865 self.lockui=False | 866 self.lockui=False |
866 # self.grid.show_all() | 867 # self.grid.show_all() |
867 return | 868 return |
868 | 869 |
869 def doDuplicateKeyScene(self,w): | 870 def doDuplicateKeyScene(self,w): |