Mercurial > MadButterfly
changeset 1527:d42951ebfc6f
Update "cur_timeline" attribute for renaming timeline
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 31 Aug 2011 17:16:44 +0800 |
parents | 04b67119df8c |
children | b7d70341ee57 |
files | pyink/domview.py |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/pyink/domview.py Wed Aug 31 15:41:12 2011 +0800 +++ b/pyink/domview.py Wed Aug 31 17:16:44 2011 +0800 @@ -990,6 +990,15 @@ def rename_timeline_of_component(self, timeline_name, new_name, comp_name): comp = self._get_component(comp_name) comp.rename_timeline(timeline_name, new_name) + + comp_node = self.get_component_group(comp_name) + try: + cur_timeline_name = comp_node.getAttribute("cur_timeline") + except KeyError: + return + if timeline_name == cur_timeline_name: + comp_node.setAttribute('cur_timeline', new_name) + pass pass def rename_timeline(self, timeline_name, new_name):