Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 441919

Summary: Dragging of Connections is broken in MVC.FX Example
Product: [Tools] GEF Reporter: Alexander Nyßen <nyssen>
Component: GEF MVCAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: matthias.wienand
Version: unspecified   
Target Milestone: 3.10.0 (Mars) M2   
Hardware: All   
OS: All   
Whiteboard:

Description Alexander Nyßen CLA 2014-08-17 08:36:38 EDT
When dragging a connection, its endpoint positions are not properly refreshed. It seems as if the connection is detached. However, if the source not is moved, the anchor position is properly updated. This is probably caused by the refactorings performed in bug #441630.
Comment 1 Alexander Nyßen CLA 2014-08-17 09:10:59 EDT
Interestingly, if both ends are attached to the same node, one of the end points stays connected.
Comment 2 Alexander Nyßen CLA 2014-08-17 09:17:14 EDT
I fear this only worked because of a side-effect before (possibly because the FXChopboxAnchor or the FXChopBoxHelper recognized a change and updated the anchor positions upon dragging the connection). 

The FXGeometricCurvePart used a (modified) FXResizeRelocatePolicy to realize the connection drag. This updates the visual bounds of the overall connection during drag and thus relies on an updating of the end-points in case they are connected. It also seemed to need an refreshVisual() to be called within performResizeRelocate(). We need to check whether it would not be more natural to only move the waypoints accordingly (rather than the visual bounds).
Comment 3 Alexander Nyßen CLA 2014-08-17 10:34:39 EDT
I disabled the behavior for now. We should provide a decent implementation within MVC.FX for it.
Comment 4 Matthias Wienand CLA 2014-09-11 05:48:13 EDT
I re-implemented connection drag via FXBendOperation. Only unconnected anchors are moved (by replacing them with static anchors at new positions). The code is published on the master branch. Therefore, I change the status to RESOLVED, FIXED.