Commit 6cca260
Quick fix for print exception of Snippet 292
The fix results from the expected behaviour of the print in Snippet 292
to redraw the control to the GC by clicking the button. This occured as a subproblem in
vi-eclipse/Eclipse-Platform#501 because this
worked only once.
The problem is that after the first click, the label points to the
image, where the group printed itself into it via the GC. Clicking a second time,
the image gets disposed. Hence, when the group wants to prints again,
the label cannot print its image, as it was disposed.
The quick fix for it is to force the label not pointing to the image, if
it has one.
The question why the label is invoked to print its image, whereby not
being in the hierarchy of the control (the group) is likely to be
connected to an undocumented flag "OS.PW_RENDERFULLCONTENT" in OS.printWindow()
which leads back to
#373.1 parent bebd1a8 commit 6cca260
File tree
1 file changed
+4
-1
lines changed- examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets
1 file changed
+4
-1
lines changedLines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| |||
0 commit comments