From: Marko Luukkainen Date: Mon, 19 Aug 2019 11:05:00 +0000 (+0300) Subject: Fix component add with overlapping setting X-Git-Tag: v1.43.0~217^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=56fa658c28ce7d9431fd016648df1022ed153ad4;p=simantics%2F3d.git Fix component add with overlapping setting gitlab #26 Change-Id: Ib510633edd933d0def918e0af996cb6f56986876 --- 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));