| Summary: | org.eclipse.draw2d.AbstractPointListShape.addPoint() call to Figure.erase() causing infinite loop in datatools subclasses | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Rekha <nrekha> | ||||
| Component: | GEF-Legacy Draw2d | Assignee: | Anthony Hunter <ahunter.eclipse> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | aboyko, ahunter.eclipse, hudsonr, lj, lozanoj | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 3.6.1 (Helios SR1) | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Rekha
In this I think we could consider removing erase() from org.eclipse.draw2d.AbstractPointListShape.addPoint(). But this code has been in GEF now since 2008 and we have not had any other complaints. Any chance you could just adopt this behavior change? Modifications of a list of points are reflected on the diagram right away (i.e. painting included)... there is logic in it... if shape's bounds change (#setBounds(Rectangle) call) the same happens for a rectangular shape. There is a chance other clients depend on this behavior... as Anthony mentioned, this change has been around for 2 years already. How can adding a point ever cause the pointlist's bounds to become smaller? The call to erase() is bogus and was never needed. Why not just remove it? The bounds can't get smaller, they can get larger. Yes erase() is bogus, because there is a repaint(). I will remove the bogus erase() from org.eclipse.draw2d.AbstractPointListShape.addPoint() in 3.6.1. I will attach a patch for everyone to review. Created attachment 178354 [details]
Patch to fix the issue.
Can you review the patch?
(In reply to comment #6) > Can you review the patch? Based on Randy's comment 3 and Alex's comment 4, we are good to remove erase(). I want to commit NOW so I can build RC3. Committed to HEAD and R3_6_maintenance for Helios SR1. |