changeset d415b76ceb89 in tryton:default details: https://hg.tryton.org/tryton?cmd=changeset&node=d415b76ceb89 description: Request a column size recomputation on treeview realization
issue11228 review370861002 diffstat: tryton/gui/window/view_form/view/list_gtk/widget.py | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diffs (23 lines): diff -r 78a1a046d717 -r d415b76ceb89 tryton/gui/window/view_form/view/list_gtk/widget.py --- a/tryton/gui/window/view_form/view/list_gtk/widget.py Wed Mar 30 19:20:31 2022 +0200 +++ b/tryton/gui/window/view_form/view/list_gtk/widget.py Wed Apr 06 14:27:11 2022 +0200 @@ -50,12 +50,15 @@ def realized(func): - "Decorator for treeview realized" + has_been_realized = False + @wraps(func) def wrapper(self, *args, **kwargs): - if (hasattr(self.view.treeview, 'get_realized') - and not self.view.treeview.get_realized()): - return + nonlocal has_been_realized + if not has_been_realized: + has_been_realized = self.view.treeview.get_realized() + if has_been_realized: + self.view.treeview.queue_resize() return func(self, *args, **kwargs) return wrapper