Mercurial > MadButterfly
comparison pyink/domview_ui.py @ 1315:fcff6978f9bf
User can switch components.
- component_manager will change domview._scenes_node and
domview._layers_parent for switching component and timeline.
- domview relys on domview._scenes_node and domview._layers_parent to
find scene nodes and layers.
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Sat, 22 Jan 2011 14:23:42 +0800 |
parents | e6bb9d00341f |
children | 9ab8d50dcf7e |
comparison
equal
deleted
inserted
replaced
1314:2aa3770f02bf | 1315:fcff6978f9bf |
---|---|
408 self._comp_dock.dom_rm_component(name) | 408 self._comp_dock.dom_rm_component(name) |
409 pass | 409 pass |
410 | 410 |
411 def switch_component(self, name): | 411 def switch_component(self, name): |
412 self._dom.switch_component(name) | 412 self._dom.switch_component(name) |
413 self.reset() # FIXME: it would parse layers again | |
414 # while switch_compoent already parses | |
415 # it. | |
413 pass | 416 pass |
414 | 417 |
415 def all_comp_names(self): | 418 def all_comp_names(self): |
416 names = self._dom.all_comp_names() | 419 names = self._dom.all_comp_names() |
417 return names | 420 return names |
507 | 510 |
508 self._doc = doc | 511 self._doc = doc |
509 self._root = root | 512 self._root = root |
510 pass | 513 pass |
511 | 514 |
512 ## \brief Reload the document. | 515 ## \brief Parse the document from the scratch and update UI. |
513 # | 516 # |
514 def reset(self): | 517 def reset(self): |
515 self._fl_stack.remove_all_framelines() | 518 self._fl_stack.remove_all_framelines() |
516 self._dom.reset() | 519 self._dom.reset() |
517 self._add_frameline_for_every_layer() | 520 self._add_frameline_for_every_layer() |