# HG changeset patch # User wycc # Date 1294934411 -28800 # Node ID 434f588fcde465dfa8399c5744ebdfcb8a76540c # Parent 1b03b6d9a915b5754e0b2aa448ed7461024ce425 Handle the change of attribute 'start' and 'end'. We do reset here. However, we should be able to optimize it latter to update the scenes directly. diff -r 1b03b6d9a915 -r 434f588fcde4 pyink/consistency.py --- a/pyink/consistency.py Thu Jan 13 23:53:38 2011 +0800 +++ b/pyink/consistency.py Fri Jan 14 00:00:11 2011 +0800 @@ -134,14 +134,19 @@ pass def do_attr_modified(self, node, name, old_value, new_value): - if node.name() == 'ns0:scene' and name == 'ref': - try: - if new_value: - raise ValueError('The new_value is not empty') - self._domviewui.reset() - except: - traceback.print_exc() + if node.name() == 'ns0:scene': + if name == 'ref': + try: + if new_value: + raise ValueError('The new_value is not empty') + self._domviewui.reset() + except: + traceback.print_exc() + pass pass - pass + elif name == 'end' or name == 'start': + self._domviewui.reset() + pass + pass pass diff -r 1b03b6d9a915 -r 434f588fcde4 pyink/domview.py --- a/pyink/domview.py Thu Jan 13 23:53:38 2011 +0800 +++ b/pyink/domview.py Fri Jan 14 00:00:11 2011 +0800 @@ -235,6 +235,7 @@ continue try: + ref = scene_node.getAttribute('ref') start, end, scene_type = self.parse_one_scene(scene_node) except: continue