From 56fa658c28ce7d9431fd016648df1022ed153ad4 Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Mon, 19 Aug 2019 14:05:00 +0300 Subject: [PATCH] Fix component add with overlapping setting gitlab #26 Change-Id: Ib510633edd933d0def918e0af996cb6f56986876 --- .../plant3d/actions/AddComponentAction.java | 36 ++++++------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/actions/AddComponentAction.java b/org.simantics.plant3d/src/org/simantics/plant3d/actions/AddComponentAction.java index 174d6f11..11982017 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/actions/AddComponentAction.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/actions/AddComponentAction.java @@ -195,31 +195,17 @@ public class AddComponentAction extends vtkSwtAction { dir = new Vector3d(); toPcp.getInlineControlPointEnds(start, end, dir); dir.normalize(); - if (!insertAdjustable || insertPosition == PositionType.NEXT) { - switch (position) { - case NEXT: - pos = new Vector3d(end); - break; - case PREVIOUS: - pos = new Vector3d(start); - break; - case SPLIT: - break; - } - } else if (insertPosition == PositionType.SPLIT) { - pos = new Vector3d(toPcp.getWorldPosition()); - } else { - switch (position) { - case NEXT: - pos = new Vector3d(start); - break; - case PREVIOUS: - pos = new Vector3d(end); - break; - case SPLIT: - break; - } - } + switch (position) { + case NEXT: + pos = new Vector3d(end); + break; + case PREVIOUS: + pos = new Vector3d(start); + break; + case SPLIT: + pos = new Vector3d(toPcp.getWorldPosition()); + break; + } } else if (toPcp.isDirected()) { dir = new Vector3d(toPcp.getDirection(Direction.NEXT)); -- 2.47.1