src/editmodes/abstractEditMode.cpp

changeset 1180
2005e4147ad6
parent 1179
1a9ffd5e0399
child 1192
317f4ce38f3f
child 1251
e75cc5bff076
--- a/src/editmodes/abstractEditMode.cpp	Fri Mar 03 23:16:14 2017 +0200
+++ b/src/editmodes/abstractEditMode.cpp	Fri Mar 03 23:23:28 2017 +0200
@@ -311,8 +311,9 @@
 		renderer()->getRelativeAxes(relativeX, relativeY);
 		QLineF line = {vertex0[relativeX], vertex0[relativeY], vertex1[relativeX], vertex1[relativeY]};
 		line.setAngle(roundToInterval<int>(line.angle(), 45));
-		result.setCoordinate(relativeX, grid()->snap(line.x2()));
-		result.setCoordinate(relativeY, grid()->snap(line.y2()));
+		QPointF point = grid()->snap(line.p2());
+		result.setCoordinate(relativeX, point.x());
+		result.setCoordinate(relativeY, point.y());
 	}
 
 	return result;

mercurial