| Summary: | findMouseEventTargetAt problem with local coordinate system | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Manuel Selva <manuel.selva> | ||||
| Component: | GEF-Legacy Draw2d | Assignee: | gef-inbox <gef-inbox> | ||||
| Status: | RESOLVED WORKSFORME | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | 3.3.1 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
(In reply to comment #0) > Created an attachment (id=95174) [details] > Main reproducing the bug > > Build ID: I20080207-1530 > > Steps To Reproduce: > 1. Launch the attached main > 2. Click on the blue label > 3. Noticed that the yellow rectangle is notified with a MousePressed event. > > > More information: I forgot to fill the more info part : After looking into draw2d's code it seems that the bug comes from: Figure.findMouseEventTargetInDescendantsAt(int x, int y) In this "recursive" method a static field PRIVATE_POINT is used. In the attached sample this PRIVATE_POINT is modified by the first call to this method on the orange rectangle and then this modified PRIVATE_POINT is used on the second call on the red rectangle returning the yellow rectangle. We can may be fix this by adding an else statement in the method to restore the PRIVATE_POINT as following : fig = fig.findMouseEventTargetAt(PRIVATE_POINT.x, PRIVATE_POINT.y); if (fig != null) return fig; else { PRIVATE_POINT.setLocation(x, y); translateFromParent(PRIVATE_POINT); } Not reproduced with last Draw2d version. Don't understand why since Figure class didn't change. Anyway I am closing this bug. Manu |
Created attachment 95174 [details] Main reproducing the bug Build ID: I20080207-1530 Steps To Reproduce: 1. Launch the attached main 2. Click on the blue label 3. Noticed that the yellow rectangle is notified with a MousePressed event. More information: