]> 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 88ab98383633de72e05bfb8b380528c1b8f5eaab..ea25230ab57c745bbe8e229e648d5604c293d4a7 100644 (file)
@@ -42,7 +42,9 @@ public class AddComponentAction extends vtkSwtAction {
        
        private Item toAdd = null;
        private PositionType insertPosition;
+       @SuppressWarnings("unused")
        private boolean insertAdjustable;
+       @SuppressWarnings("unused")
        private boolean lengthAdjustable;
        
        private String libUri;
@@ -81,6 +83,7 @@ public class AddComponentAction extends vtkSwtAction {
        
        private Double length;
        private Double angle;
+       private Double rotationAngle;
        private Double diameter;
        private Double turnRadius;
        
@@ -98,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();
@@ -175,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) {