]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/actions/TranslateFreeVariableLengthAction.java
Get inline component direction irrespectively of connectivity
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / actions / TranslateFreeVariableLengthAction.java
index c9bdea171ec8b452571a5d53952bacdc5077db8a..1088a894347af1ab908d26083059e1220ebfdc5c 100644 (file)
@@ -92,7 +92,8 @@ public class TranslateFreeVariableLengthAction extends RoutePipeAction{
             lock = LockType.CUSTOM;
         } else if (startComponent instanceof PipelineComponent){
             if (startComponent instanceof InlineComponent) {
-                direction = startComponent.getControlPoint().getPathLegDirection(reversed ? Direction.PREVIOUS : Direction.NEXT);
+                direction = startComponent.getControlPoint().getInlineDir();
+                if (reversed) direction.negate();
                 lock = LockType.CUSTOM;
                 if (((InlineComponent) startComponent).isVariableLength()) {
                     direction = null;