Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362973 - Wrong tether polyline start point on LabelEditParts when using himetric-based diagrams
Summary: Wrong tether polyline start point on LabelEditParts when using himetric-based...
Status: NEW
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-05 15:12 EDT by Andreas Unger CLA
Modified: 2011-11-05 15:12 EDT (History)
0 users

See Also:


Attachments
Patch (2.22 KB, patch)
2011-11-05 15:12 EDT, Andreas Unger CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Unger CLA 2011-11-05 15:12:20 EDT
Build Identifier: 20110615-0604

When using himetric-based diagrams, the start point of the tether polyline (dashed feedback line) between LabelEditParts and other EditParts (usually the parent of the LabelEditPart) is always on the right side of the LabelEditPart. The expected behavior is that the start point is attached to the LabelEditPart side which is most close to the parent EditPart. This works properly for pixel-based diagrams.

The bug can be tracked down to the NonResizableLabelEditPolicy#showChangeBoundsFeedback(ChangeBoundsRequest) method. Here, the reference point -- which is later used to compute the closest side -- is obtained from the LabelEditPart (line 67). However, the reference point is not translated to absolute, and thus is not converted to device unit, as it is done for the other values. As a result, the calculation for the closest LabelEditPart side is mixing logical  and device units resulting in an erroneous side.

I attached a patch which fixes the problem for me.

Reproducible: Always

Steps to Reproduce:
1. Create himetric-based diagram
2. Create connection containing a label
3. Move the label -> it will always stick to the right label side
Comment 1 Andreas Unger CLA 2011-11-05 15:12:58 EDT
Created attachment 206493 [details]
Patch