- switch(orientationFrom){
- case Parameters::North :
- if(pointFrom.y() < pointTo.y()) {
- y = pointFrom.y()-marginConn;
- }
- else {
- y = pointTo.y()-marginConn;
- }
- p = QPointF(pointFrom.x(),y);
- pathPaint.lineTo(p);
- interPoints.append(p);
- p = QPointF(pointTo.x(),y);
- pathPaint.lineTo(p);
- interPoints.append(p);
- pathPaint.lineTo(pointTo);
- break;
- case Parameters::South :
- if(pointFrom.y() > pointTo.y()) {
- y = pointFrom.y()+marginConn;
- }
- else {
- y = pointTo.y()+marginConn;
+ if ((orientationFrom == Parameters::North) || (orientationFrom == Parameters::South)) {
+ double diffPos = pointFrom.y() - pointTo.y();
+ if (orientationFrom == Parameters::North) {
+ gap = -gap;
+ diffPos = -diffPos;