Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /src/plugins/simple_router/simpleroutinginformation.cpp [1b4f9d] .. [3edb4c] Maximize Restore

  Switch to side-by-side view

--- a/src/plugins/simple_router/simpleroutinginformation.cpp
+++ b/src/plugins/simple_router/simpleroutinginformation.cpp
@@ -28,7 +28,9 @@
 
 QPointF KTechLab::SimpleRoutingInformation::alignToGrid(const QPointF& point)
 {
-    return QPoint( QPointF(point * 8).toPoint() / 8);
+    QPoint r = (point - QPointF(4,4)).toPoint();
+    r /= 8;
+    return (r*8) + QPointF(4,4);
 }
 
 void KTechLab::SimpleRoutingInformation::mapRoute(QPointF p1, QPointF p2)