private void _createCP() throws Exception{
if (controlPoint != null)
return;
- if (getPipeRun() != null) {
- controlPoint = ControlPointFactory.create(this);
- // TODO : these should not be needed.
- controlPoint.setDeletable(false);
- controlPoint.setFixed(true);
- }
+ controlPoint = ControlPointFactory.create(this);
+ // TODO : these should not be needed.
+ controlPoint.setDeletable(false);
+ controlPoint.setFixed(true);
+ syncNext();
+ syncPrevious();
}
@RelatedSetObj(Plant3D.URIs.HasPipeRun)
@Override
public void setPipeRun(PipeRun pipeRun) {
+ if (this.getPipeRun() == pipeRun)
+ return;
+
super.setPipeRun(pipeRun);
try {
_createCP();
PipeRun pipeRun = getPipeRun();
if (pipeRun != null) {
- map.put("length", pipeRun.getPipeDiameter() * 2.0);
+ //map.put("length", pipeRun.getPipeDiameter() * 2.0);
map.put("radius", pipeRun.getPipeDiameter() * 0.5);
}
return map;