Allow passing None to Form.set_renderer()

i.e. to remove any renderer which has been set
This commit is contained in:
Lance Edgar 2018-01-11 15:17:58 -06:00
parent f021df446c
commit dfd43b55aa

View file

@ -576,6 +576,10 @@ class Form(object):
self.enums.pop(key, None)
def set_renderer(self, key, renderer):
if renderer is None:
if key in self.renderers:
del self.renderers[key]
else:
self.renderers[key] = renderer
def set_widget(self, key, widget):