# HG changeset patch # User Thinker K.F. Li # Date 1302155107 -28800 # Node ID 3519f43da037b6709303bc2191e3817443dd21a1 # Parent 485cca025a77c261e0ca708f11d8f00d8f43dcfb Check old component before hiding it for a component switching. Ref: ticket #37 in assembla - Scribboo try to hide old component before switching to new one. But, old one was already removed. It cause an error. - This is fixed by checking old component if it is still existed before hiding it. diff -r 485cca025a77 -r 3519f43da037 pyink/domview.py --- a/pyink/domview.py Thu Apr 07 11:56:18 2011 +0800 +++ b/pyink/domview.py Thu Apr 07 13:45:07 2011 +0800 @@ -474,7 +474,17 @@ first_name = comp.all_timeline_names()[0] self.switch_timeline(first_name) - self.hide_component(old_comp.name()) + try: + comp_grp = self.get_component_group(old_comp.name()) + old_comp_existed = True + except ValueError: + old_comp_existed = False + pass + + if old_comp_existed: + self.hide_component(old_comp.name()) + pass + self.show_component(comp.name()) pass