Community
Participate
Working Groups
Created attachment 268901 [details] How to reproduce the bug This bug was reproduced in the GEF logo example integration release 5.0.0.201706100201. Steps to reproduce: 1. Create new waypoint for some connection by dragging a white bend point. 2. Undo action Expected: The visual bend points are restored. Actual: The end visual bend point has disappeared.
It is important to clarify the terminology of "bend points" and "handles": content and visual bend points represent (connected or unconnected) way points of an IBendableContentPart or its visual, respectively. Within the GEF Logo Example, circular handles are generated for all bend points when a GeometricCurvePart is selected. The handles can be used to manipulate the underlying bend points. In this case, the bend point is correctly restored. Only the handle that can be used to manipulate that bend point is not restored. I changed the title accordingly. Updating of (selection) handles during interaction is done via SelectionBehavior#updateHandles(). This call is not performed when undoing the operation. Hence, the handles are not up-to-date after undo. Probably, the SelectionBehavior should be able to identify that an update is necessary and perform it automatically. As a fix will not be released until Oxygen.1 (although most certainly published way earlier on the master branch), the following workaround can be used in the interim: you can construct a ForwardUndoCompositeOperation that wraps a BendVisualOperation, as well as a special operation for updating the handles, so that they are updated after every execution/undo of the visual bend points.