# HG changeset patch # User Thinker K.F. Li # Date 1294839686 -28800 # Node ID 776b024ae8f9fb0f2823edd1782a1fb45e48ce80 # Parent a4d3838264dd609abc200a6be319961dc253c12c Fix the buggy implementation of reset() - old implementation is too buggy to make a lot wrong assumption. diff -r a4d3838264dd -r 776b024ae8f9 pyink/domview.py --- 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): diff -r a4d3838264dd -r 776b024ae8f9 pyink/domview_ui.py --- 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.