Skip to content
Snippets Groups Projects
Commit 577a5f5f authored by Tiziano Munaro's avatar Tiziano Munaro
Browse files

Fix inversion of arrows for curved links

parent a9d220c4
No related branches found
No related tags found
1 merge request!88[3873] Ellipses and Bezier curves
ContextMenuUtil.java 405387151d45b09dffb3b6ba44f980313c8edcaf GREEN
CurvedLinkLayoutedContentAnchorangeController.java 2d136ab28d62047b84a951515ab7338328760811 GREEN
CurvedLinkLayoutedContentAnchorangeController.java 67c20e31ddb82fe2fd499117193353b0545839a0 YELLOW
EObjectDiagramController.java 9af59e8e586c8251d174108a2ce2fcdee5e75782 GREEN
EObjectEllipticResizableContentControllerBase.java 3494d4f0dcdff5eb35f22f0e21d04df81b32e494 GREEN
EObjectModelChangeProvider.java f4b60cebb088a5c81ca92a41614e1a5d40030502 GREEN
......
......@@ -17,6 +17,8 @@ package org.fortiss.tooling.base.ui.editor.fx.controller;
import static org.fortiss.tooling.base.ui.utils.LayoutDataUIUtils.addConnectionPoint;
import org.fortiss.tooling.base.model.base.EntryConnectorBase;
import org.fortiss.tooling.base.model.base.ExitConnectorBase;
import org.fortiss.tooling.base.model.element.IConnection;
import org.fortiss.tooling.base.model.element.IConnector;
import org.fortiss.tooling.base.model.layout.ILayoutedModelElement;
......@@ -49,8 +51,10 @@ public class CurvedLinkLayoutedContentAnchorangeController<T extends IConnector
// Fetch newly created connection by comparing incoming and outgoing connections of the
// given connectors. As only one connection is allowed between a pair of connectors, this
// 'findFirst' is safe.
T startConnector = (T)startBundle.getModel();
T endConnector = (T)endBundle.getModel();
T startConnector = (T)(startBundle.getModel() instanceof ExitConnectorBase
? startBundle.getModel() : endBundle.getModel());
T endConnector = (T)(endBundle.getModel() instanceof EntryConnectorBase
? endBundle.getModel() : startBundle.getModel());
IConnection connection = startConnector.getOutgoing().stream()
.filter(segment -> endConnector.getIncoming().contains(segment)).findFirst().get();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment