Mercurial > MadButterfly
changeset 1317:e2ad9eb7f7a4
Show timelines correctly
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Sat, 22 Jan 2011 19:44:07 +0800 |
parents | 9ab8d50dcf7e |
children | b1776f441e8a |
files | pyink/domview.py |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pyink/domview.py Sat Jan 22 19:28:36 2011 +0800 +++ b/pyink/domview.py Sat Jan 22 19:44:07 2011 +0800 @@ -109,6 +109,9 @@ scenes_node.setAttribute('id', node_id) comp_node.appendChild(scenes_node) + + tl = Timeline(scenes_node) + self.timelines.append(tl) pass ## \brief Add a timeline for an existed scenes node. @@ -119,11 +122,16 @@ if self.has_timeline(name): raise ValueError, \ 'name of scenes node of a timeline is duplicated' + + self.timeline.append(tl) pass def rm_timeline(self, name): for i, tl in enumerate(self.timelines): if tl.name() == name: + comp_node = self.node + comp_node.removeChild(tl.scenes_node) + del self.timelines[i] return pass @@ -287,7 +295,7 @@ pass def all_comp_names(self): - return list(self._comp_names) + return [comp.name() for comp in self._components] def has_component(self, name): return name in self._comp_names