| Summary: | Wrong bounds used when creating a BaseSlidableAnchor for a NodeFigure with a TransparentBorder | ||
|---|---|---|---|
| Product: | [Modeling] GMF-Runtime | Reporter: | Laurent Redor <laurent.redor> |
| Component: | General | Assignee: | Project Inbox <gmf-runtime-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | pierre-charles.david |
| Version: | unspecified | ||
| Target Milestone: | 1.13.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://git.eclipse.org/r/100751 https://git.eclipse.org/r/100750 https://bugs.eclipse.org/bugs/show_bug.cgi?id=519305 https://git.eclipse.org/c/gmf-runtime/org.eclipse.gmf-runtime.git/commit/?id=022b1730e7fb715cd27e48ffb89b6880e484ab25 https://git.eclipse.org/c/gmf-runtime/org.eclipse.gmf-runtime.git/commit/?id=4dadda7de48428bc197db858f8c037aa8177d353 |
||
| Whiteboard: | |||
New Gerrit change created: https://git.eclipse.org/r/100751 New Gerrit change created: https://git.eclipse.org/r/100750 * https://git.eclipse.org/r/100750: A gerrit to add a test that reveal the bug * https://git.eclipse.org/r/100751: A gerrit to fix the problem Gerrit change https://git.eclipse.org/r/100750 was merged to [master]. Commit: http://git.eclipse.org/c/gmf-runtime/org.eclipse.gmf-runtime.git/commit/?id=022b1730e7fb715cd27e48ffb89b6880e484ab25 Gerrit change https://git.eclipse.org/r/100751 was merged to [master]. Commit: http://git.eclipse.org/c/gmf-runtime/org.eclipse.gmf-runtime.git/commit/?id=4dadda7de48428bc197db858f8c037aa8177d353 Fixed on master. |
For the creation of a BaseSlidableAnchor for a NodeFigure with a TransparentBorder, the getBounds() is used. Example of corresponding stack trace: Thread [main] (Suspended (breakpoint at line 602 in Figure)) org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure(Figure).getBounds() line: 602 org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure(NodeFigure).createConnectionAnchor(Point) line: 174 org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure(NodeFigure).getTargetConnectionAnchorAt(Point) line: 157 BorderedNodeFigure.getTargetConnectionAnchorAt(Point) line: 203 But after, when someone want to compute the anchor location, the getHandleBounds() is used. Example of corresponding stack trace: Thread [main] (Suspended (breakpoint at line 91 in NodeFigure)) org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure(NodeFigure).getHandleBounds() line: 91 org.eclipse.gmf.runtime.gef.ui.figures.SlidableAnchor.getBox() line: 66 org.eclipse.gmf.runtime.draw2d.ui.figures.BaseSlidableAnchor.getAnchorPosition() line: 147 The both methods do not return the same Rectangle. This can causes a shift of few pixel in some cases.