import org.simantics.plant3d.dialog.ComponentSelectionDialog;
import org.simantics.plant3d.gizmo.TerminalSelectionGizmo;
import org.simantics.plant3d.scenegraph.InlineComponent;
+import org.simantics.plant3d.scenegraph.Nozzle;
import org.simantics.plant3d.scenegraph.P3DRootNode;
import org.simantics.plant3d.scenegraph.PipeRun;
import org.simantics.plant3d.scenegraph.PipelineComponent;
this.component = component;
allowed.clear();
- if (component.getNext() == null) {
- allowed.add(PositionType.NEXT);
- }
- if (component.getPrevious() == null) {
- allowed.add(PositionType.PREVIOUS);
- }
- if (component instanceof InlineComponent && !component.getControlPoint().isFixed()){
- allowed.add(PositionType.SPLIT);
+ if (component instanceof Nozzle) {
+ if (component.getNext() == null && component.getPrevious() == null) {
+ allowed.add(PositionType.NEXT);
+ }
+ } else {
+ if (component.getNext() == null) {
+ allowed.add(PositionType.NEXT);
+ }
+ if (component.getPrevious() == null) {
+ allowed.add(PositionType.PREVIOUS);
+ }
+ if (component instanceof InlineComponent && !component.getControlPoint().isFixed()){
+ allowed.add(PositionType.SPLIT);
+ }
}
setEnabled(allowed.size() > 0);
}