Symbol library view groups sometimes are shown with only background colors until view is resized
- Open new diagram
- Open Symbols view
- Write something to search field to filter symbols so that multiple symbol groups are to be expanded
Often it happens that the last group left visible after filtering turns out to show only a gray background color and not the symbol group contents. The problem goes away when the in some way causes the view to be resized and its layout to be refreshed.
The problemn stems from the control size not propagating through the AWT Frame
returned by SWT_AWT.newFrame
. Usually the problem seems to be mainly with the height dimension.
When things work:
SWTChassis : SWTAWTComponent (w1 > 0, h1 > 0)
- AWT Frame (w2 <= w1, h2 = h1 && h2 > 0)
- AWTChassis (w3 = w2, h3 = h2)
and when they don't:
SWTChassis : SWTAWTComponent (w1 > 0, h1 > 0)
- AWT Frame (w2 <= w1, h2 = 0)
- AWTChassis (h3 = 0)
and h1
never propagates to h2
until the view is resized.
I found that manually setting Frame.setSize(w, h)
works just as well so the current planned workaround is to add a self-removing ControlListener
to SWTAWTComponent that ensures the initial > 0 control size gets propagated to the AWT Frame
.