[boxes] take care to duplicated 'title' argument if already specified in cw_extra_kwargs
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 21 Oct 2010 09:48:38 +0200
changeset 6573 58f166d41420
parent 6570 7e9a1a5919e8
child 6574 a7bbd69f1d1c
[boxes] take care to duplicated 'title' argument if already specified in cw_extra_kwargs
web/views/boxes.py
--- a/web/views/boxes.py	Thu Oct 21 08:23:38 2010 +0200
+++ b/web/views/boxes.py	Thu Oct 21 09:48:38 2010 +0200
@@ -244,9 +244,11 @@
             # XXX do not modify dispctrl!
             self.cw_extra_kwargs['dispctrl'].setdefault('subvid', 'outofcontext')
             self.cw_extra_kwargs['dispctrl'].setdefault('use_list_limit', 1)
+        if title:
+            self.cw_extra_kwargs['title'] = title
         box = self._cw.vreg['ctxcomponents'].select(
             'rsetbox', self._cw, rset=self.cw_rset, vid='autolimited',
-            title=title, **self.cw_extra_kwargs)
+            **self.cw_extra_kwargs)
         box.render(self.w)