# HG changeset patch # User Goffi # Date 1510421966 -3600 # Node ID 941fdf81958c2bdc266b145fec0fcb09446782c5 # Parent c2d88fe053036f24121b2ec3eb7a977c07a0cdbe core (XMLUI): form's XMLUI is use as first arguments for filters in dataForm2Widgets diff -r c2d88fe05303 -r 941fdf81958c src/tools/xml_tools.py --- a/src/tools/xml_tools.py Sat Nov 11 18:39:24 2017 +0100 +++ b/src/tools/xml_tools.py Sat Nov 11 18:39:26 2017 +0100 @@ -113,8 +113,8 @@ be added first to the container. @param filters(dict, None): if not None, a dictionary of callable: key is the name of the widget to filter - the value is a callable, it will get widget's type, args and kwargs - and must return the same variable, which it can modify + the value is a callable, it will get form's XMLUI, widget's type, args and kwargs + and must return widget's type, args and kwargs (which can be modified) This is especially useful to modify well known fields @return: the completed XMLUI instance """ @@ -136,7 +136,7 @@ except KeyError: pass else: - widget_type, widget_args, widget_kwargs = widget_filter(widget_type, widget_args, widget_kwargs) + widget_type, widget_args, widget_kwargs = widget_filter(form_ui, widget_type, widget_args, widget_kwargs) label = field.label or field.var if label: form_ui.addLabel(label)