Community
Participate
Working Groups
There is a bug in ThumbnailUpdater. It occurs when the source figure is moving. in Thumbnail.ThumbnailUpdater.start() the thumbnailGraphics is translated: thumbnailGraphics.translate(sourceFigure.getBounds().getLocation().negate()); There is silently assumed that source figure is not moving. But is the source figure is moving and ThumbnailUpdater is running, the method run() again asks for a source figure location: org.eclipse.draw2d.geometry.Point p = sourceFigure.getBounds().getLocation(); and this can be different. I recommend to delete a line that translates thumbnailGraphics in the method start() and add it into a method run(). I will attach an example where we can see the effect of this bug and also my proposal - code change.
Created attachment 16160 [details] Thumbnail bug demo A test code.
Created attachment 16161 [details] Patch proposal (Thumbnail.java) A proposed patch. Changes in the code are marked by a tag: TODO 79542
I forgot to describe how to see a bug effect in the test code: Run the text and drag a scroll bar. The thumbnail is not redrawing correctly.
Created attachment 83071 [details] BrokenThumbnailExample I took the code from the provided demo and patched it into the ThumbNailExample in draw2d examples. I can confirm that the text is missing from the thumbnail. Interesting that if we add 5 sets of figures (i = 5) the text appears in the thumbnail. Other values (i = 10) cause the text to not be in the thumbnail. The provided patch does not fix the issue, so I have obsoleted it.
Created attachment 123955 [details] Thumbnails updater now checks to see whether the source figure is moving before it tries to repaint it
Reassigned back to gef-inbox, also resetting target milestone, which has long passed.
With the changes applied in bug #309912 and bug #477750 this seems to have been resolved as well. Resolving as fixed in 3.11.0 M2.