// update control points.
// TODO : this should be optimized.
try {
- for (INode node : rootNode.getChild()) {
- if (node instanceof PipeRun) {
- for (PipelineComponent pc : ((PipeRun) node).getChild())
- pc.sync();
- } else if (node instanceof Equipment) {
- for (PipelineComponent pc : ((Equipment) node).getChild())
- pc.sync();
- }
- }
-
- for (INode node : rootNode.getChild()) {
- if (node instanceof PipeRun) {
- for (PipelineComponent pc : ((PipeRun) node).getChild())
- pc.sync2();
- } else if (node instanceof Equipment) {
- for (PipelineComponent pc : ((Equipment) node).getChild())
- pc.sync2();
- }
- }
- for (INode node : rootNode.getChild()) {
- if (node instanceof PipeRun) {
- PipingRules.validate((PipeRun)node);
- }
- }
- PipingRules.setEnabled(true);
- for (INode node : rootNode.getChild()) {
- if (node instanceof PipeRun) {
- PipeRun run = (PipeRun)node;
- for (PipeControlPoint pcp : run.getControlPoints())
- PipingRules.positionUpdate(pcp);
-
- }
- }
+ P3DUtil.finalizeDBLoad(rootNode);
+
} catch (Exception e) {
throw new DatabaseException(e);
}
m.add(add);
}
} else if (node instanceof Nozzle) {
- m.add(translateAction);
- m.add(rotateAction);
- Nozzle nozzle = (Nozzle)node;
+ Nozzle nozzle = (Nozzle)node;
+ if (!nozzle.isFixed()) {
+ m.add(translateAction);
+ m.add(rotateAction);
+ }
m.add(routePipeAction);
routePipeAction.setComponent(nozzle);
routePipeAction.setEnabled(nozzle.getNext() == null && nozzle.getPrevious() == null);