+
+ private void mergeWithAlternative() {
+ PipeRun run = getPipeRun();
+ PipeRun alternative = getAlternativePipeRun();
+ if (alternative != null) {
+ // Move components from alternative pipe run to main run
+ PipelineComponent p = getNext();
+ while (p != null && p.getPipeRun() == alternative) {
+ if (p.getParent() == alternative) {
+ p.deattach(); // For components
+ run.addChild(p);
+ }
+ else {
+ p.setPipeRun(run); // For nozzles
+ }
+
+ p.updateParameters();
+ PipingRules.requestUpdate(p.getControlPoint());
+
+ p = p.getNext();
+ }
+
+ setAlternativePipeRun(run);
+
+ if (alternative.getChild().isEmpty())
+ alternative.remove();
+ }
+ }