From 801ede5790d77a7550a0e6fe1082f6dab17e979f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 5 Sep 2018 21:16:18 +0200 Subject: [PATCH] Force empty text property on no visible cell In some cases, the treeview with fixed height mode computes a too big height for the row which a non visible cell with text. This is an hack to avoid this behavior. issue7667 review49541002 --- tryton/gui/window/view_form/view/list_gtk/widget.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tryton/gui/window/view_form/view/list_gtk/widget.py b/tryton/gui/window/view_form/view/list_gtk/widget.py index 7ff9c8b3fe..f483747db3 100644 --- a/tryton/gui/window/view_form/view/list_gtk/widget.py +++ b/tryton/gui/window/view_form/view/list_gtk/widget.py @@ -219,6 +219,12 @@ class GenericText(Cell): field.state_set(record, states=states) invisible = field.get_state_attrs(record).get('invisible', False) cell.set_property('visible', not invisible) + # Sometimes, the treeview with fixed height mode computes a too big + # height for not visible cell with text + # We can force an empty text because not visible cell can not be edited + # and so value_from_text is never called. + if invisible: + cell.set_property('text', '') if editable: readonly = self.attrs.get('readonly',