]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/dialog/ComponentSelectionDialog.java
Allow insertion of reducers in the middle of pipe runs
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / dialog / ComponentSelectionDialog.java
index dd3f48076b1a1c12836d24359643c992255bf2a4..0c292bc8ff8a5ec2c0173e8a40f63fce4c954eea 100644 (file)
@@ -437,7 +437,7 @@ public class ComponentSelectionDialog extends Dialog implements ISelectionChange
                                if (selected.getType() == Type.INLINE) {
                                        filterAllowed.add(PositionType.NEXT);
                                        filterAllowed.add(PositionType.PREVIOUS);
-                                       if (inlineSplit) {
+                                       if (inlineSplit && selected.isVariable()) {
                                                lengthText.setEnabled(false);
                                                angleText.setEnabled(false);
                                                rotationAngleText.setEnabled(selected.isRotated());
@@ -472,25 +472,16 @@ public class ComponentSelectionDialog extends Dialog implements ISelectionChange
                        }
                
                        if (selected.isSizeChange()) {
-                               filterAllowed.add(PositionType.NEXT);
-                               filterAllowed.add(PositionType.PREVIOUS);
-                               if (inlineSplit) {
-                                       turnRadiusText.setEnabled(false);
-                                       diameterText.setEnabled(false);
+                               turnRadiusText.setEnabled(true);
+                               diameterText.setEnabled(true);
+                               if (diameter == null || turnRadius == null)
                                        ok = false;
-                               } else {
-                                       turnRadiusText.setEnabled(true);
-                                       diameterText.setEnabled(true);
-                                       if (diameter == null || turnRadius == null)
-                                               ok = false;
-                               }
-                               
                        } else {
                                turnRadiusText.setEnabled(false);
                                diameterText.setEnabled(false);
                        }
                        
-                       if (!selected.isSizeChange() && !selected.isVariable()) {
+                       if (!selected.isVariable()) {
                                switch (selected.getType()) {
                                        case END:
                                                filterAllowed.add(PositionType.NEXT);