Mercurial > MadButterfly
changeset 1344:8f1f8ef5c9ea
Hide scene groups of old timeline when switching to a new timeline.
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 09 Feb 2011 07:07:08 +0800 |
parents | c2fbae4f0adc |
children | e0400a2b7c35 |
files | pyink/domview.py |
diffstat | 1 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/pyink/domview.py Tue Feb 08 13:35:21 2011 +0800 +++ b/pyink/domview.py Wed Feb 09 07:07:08 2011 +0800 @@ -532,8 +532,28 @@ def get_current_component(self): return self._cur_comp.name() + + ## \brief Hide scene groups of current timeline. + # + # This method all scene groups of current timeline invisible. + # + def _hide_current_timeline(self): + tl = self._cur_timeline + scenes_node = tl.scenes_node + for child in scenes_node.childList(): + if child.name() != 'ns0:scene': + continue + gid = child.getAttribute('ref') + group = self._domview.get_node(gid) + group.setAttribute('style', 'display: none') + pass + pass def switch_timeline(self, timeline_name): + if self._cur_timeline: + self._hide_current_timeline() + pass + tl = self._cur_comp.get_timeline(timeline_name) self._cur_timeline = tl self._domview._scenes_node = tl.scenes_node # of class domview