if (path instanceof RightAnglePath){
// Save old params
Rectangle dirtyArea = getBounds();
ConnectionPathEdit ce = new ConnectionPathEdit(this);
setPath(new StraightPath(path.getNode(0), path.getNode(path.getNodeNumber()-1)));
ce.pathHasChanged();
dirtyArea.add(getBounds());
dirtyArea.x -=10;
dirtyArea.y -=10;