| Summary: | Image in ImageFigure rendered on wrong position / GridData modifies PreferredSize | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Heiko Böttger <heiko.boettger> | ||||
| Component: | GEF-Legacy Draw2d | Assignee: | Alex Boyko <aboyko> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | aboyko, cocoakevin, francisu, mvo | ||||
| Version: | 3.5 | ||||||
| Target Milestone: | 3.6.1 (Helios SR1) | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Heiko Böttger
GridLayout is SWT GridData calls computeSize on the control that it's trying to layout and sizes the control according to its computed size. ImageFigure can (should?) over ride computeSize to return its preferred size. Hello, it seems like this bug was redirected to the wrong group. It's not swt its draw2d. And there is a GridLayout (org.eclipse.draw2d.GridLayout) too. When I filled in the bug report I wondered where to define that this bug is related to gef/draw2d. reopening to reassign I consider it a major bug that GridData.computeSize method modifies a dimension returned from the figure. JavaDoc of IFigure#getPreferredSize(int, int) clearly says that the returned dimension must not be modified. Yes, we need to call getCopy() on the preferred size dimension. This can be delivered for GEF 3.6.1 Created attachment 177837 [details]
Patch to fix the issue.
Hi Alex, I think this is the fix we are looking for here. Can you all confirm?
Hey Anthony, yes, this is definitely the fix. If you feel like delivering it, please do, because if I don't do this now I'll just forget about it again until someone brings it up again :-) Thanks! (In reply to comment #7) > Created an attachment (id=177837) [details] > Patch to fix the issue. > > Hi Alex, I think this is the fix we are looking for here. Can you all confirm? Yes, fix looks OK. Delivered the fix |