# HG changeset patch # User Thinker K.F. Li # Date 1314782204 -28800 # Node ID d42951ebfc6f5dcbee1ce5bfbb0a9e4c0aa6c282 # Parent 04b67119df8ca4b32926b2de3bb30f00e0d62d03 Update "cur_timeline" attribute for renaming timeline diff -r 04b67119df8c -r d42951ebfc6f pyink/domview.py --- 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):