comparison frontends/src/quick_frontend/quick_widgets.py @ 1995:b5ef9b2b995e 0.7-dev

quick_frontend (QuickWidget): keep on_new_widget argument when recreating a widget
author Goffi <goffi@goffi.org>
date Mon, 11 Jul 2016 19:22:40 +0200
parents 633b5c21aefd
children 19b9d3f8a6c7
comparison
equal deleted inserted replaced
1994:a5eb6f6b8db2 1995:b5ef9b2b995e
207 except KeyError: 207 except KeyError:
208 pass 208 pass
209 else: 209 else:
210 raise ValueError("force_hash option can't be used with on_existing_widget=RECREATE") 210 raise ValueError("force_hash option can't be used with on_existing_widget=RECREATE")
211 211
212 new_kwargs['on_new_widget'] = on_new_widget
213
212 # XXX: keep up-to-date if new special kwargs are added (i.e.: delete these keys here) 214 # XXX: keep up-to-date if new special kwargs are added (i.e.: delete these keys here)
213 new_kwargs['on_existing_widget'] = C.WIDGET_RAISE 215 new_kwargs['on_existing_widget'] = C.WIDGET_RAISE
214 hash_idx = 1 216 hash_idx = 1
215 while True: 217 while True:
216 new_kwargs['force_hash'] = "{}_new_instance_{}".format(hash_, hash_idx) 218 new_kwargs['force_hash'] = "{}_new_instance_{}".format(hash_, hash_idx)