Skip to content
Snippets Groups Projects
Commit c87240ca authored by Klaus Becker's avatar Klaus Becker
Browse files

solved bug

refs 406
parent 4ededccc
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,6 @@ public class CreateCommand extends CommandBase {
@Override
public void execute() {
doLayout();
addConnectionPoint(connection, location.x, location.y);
addConnectionPoint(connection, index, location.x, location.y);
}
}
......@@ -243,13 +243,13 @@ public class LayoutDataUtils {
}
/** Adds the given x/y point to the layout data of the given element. */
public static void addConnectionPoint(ILayoutedModelElement lobject, int x,
int y) {
Points pts = getConnectionPoints(lobject);
Point np = LayoutModelElementFactory.createPoint(x, y, null);
pts.getPointsList().add(np);
public static void addConnectionPoint(ILayoutedModelElement lobject,
int index, int x, int y) {
Points existingPoints = getConnectionPoints(lobject);
Point newPoint = LayoutModelElementFactory.createPoint(x, y, null);
existingPoints.getPointsList().add(index, newPoint);
PointsUtils.setPoints(lobject, LayoutKeyConstants.CONNECTION_POINTS,
pts);
existingPoints);
}
/** Changes the point of the layout data at the given index. */
......
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