]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/actions/AddComponentAction.java
Ask component rotation angle when adding components
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / actions / AddComponentAction.java
index 56b0443eb203b71a16300387d7e8c7e292e3c53d..ea25230ab57c745bbe8e229e648d5604c293d4a7 100644 (file)
@@ -83,6 +83,7 @@ public class AddComponentAction extends vtkSwtAction {
        
        private Double length;
        private Double angle;
+       private Double rotationAngle;
        private Double diameter;
        private Double turnRadius;
        
@@ -100,6 +101,7 @@ public class AddComponentAction extends vtkSwtAction {
                this.lengthAdjustable = dialog.isLenghtAdjustable();
                this.length = dialog.getLength();
                this.angle = dialog.getAngle();
+               this.rotationAngle = dialog.getRotationAngle();
                this.diameter = dialog.getDiameter();
                this.turnRadius = dialog.getTurnRadius();
                allowed = dialog.filterAllowed();
@@ -177,6 +179,7 @@ public class AddComponentAction extends vtkSwtAction {
                        inst.length = length;
                        inst.turnRadius = turnRadius;
                        inst.insertPosition = insertPosition;
+                       inst.rotationAngle = rotationAngle;
                        inst.position = position;
                        ComponentUtils.addComponent(root, component, inst);
                } catch (Exception e) {