Mercurial > MadButterfly
changeset 1275:776b024ae8f9
Fix the buggy implementation of reset()
- old implementation is too buggy to make a lot wrong assumption.
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 12 Jan 2011 21:41:26 +0800 |
parents | a4d3838264dd |
children | 0442ae9c2ac2 |
files | pyink/domview.py pyink/domview_ui.py |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pyink/domview.py Wed Jan 12 21:20:06 2011 +0800 +++ b/pyink/domview.py Wed Jan 12 21:41:26 2011 +0800 @@ -351,7 +351,8 @@ pass def reset(self): - self.handle_doc_root( self._doc, self._root) + self._layers = [] + self._parse_all_layers() pass def dumpattr(self, n):
--- a/pyink/domview_ui.py Wed Jan 12 21:20:06 2011 +0800 +++ b/pyink/domview_ui.py Wed Jan 12 21:41:26 2011 +0800 @@ -431,7 +431,8 @@ # def reset(self): self._fl_stack.remove_all_framelines() - self.handle_doc_root(self._doc, self._root) + self._dom.reset() + self._add_frameline_for_every_layer() pass ## \brief Mark given frame as a key frame.