I have a wizard displaying lines with icons. When the wizard is displayed, there is no icon. I also have a on_change that reloads the lines, and when the on_change is called, the icons appear.
I don't think so, because when the data are refreshed, without changing anything everything appear.
As you can see in the first attachement, there is the issue on the icon, but also on the ">" symbol for the tree and the suffix on the currency.
I don't know if all those issues are linked, but everything is fixed after the refresh.
I experience something similar when using icons in any tree view (tryton 3.7). The first time you enter the view, no icons are shown. After we reload/refresh the tree view, everything is OK.
After looking into this problem, i have found a possible fix.
After removing the '@realized' decorator from 'setter' method of the 'Affix' class in /tryton/gui/window/view_form/view/list_gtk/widget.py, the problem no longer persists.
Although i'm unsure of the effect caused by removing this decorator?
See r2914f085c911, it will remove the lazy loading.
Indeed you should not look at removing the feature but fixing it.
According to your discover, the issue is that the setter is called when the treeview is not yet realized and never called later when it is.
This sounds like a racing condition
I have been playing around with this problem.
As you said the problem is the treeview is not 'realized'.
Although i am unable to find the race condition you mentioned, i noticed that the problem only exists when the treeview is inside a gtk.Dialog. Knowing this i have found a workaround that fixes the problem: see 20031003
The review20031003 doesn't fix anything, it is the same as msg24292 but with a reduced perimeter.
Maybe indeed it is because the dialog is not yet shown when the setter is called.