src/editmodes/circleMode.cpp

changeset 1430
6ce6d3da584f
parent 1417
ed39bfca7a67
child 1437
1a77c6156db7
--- a/src/editmodes/circleMode.cpp	Tue Aug 07 20:34:32 2018 +0300
+++ b/src/editmodes/circleMode.cpp	Sat Sep 15 15:57:56 2018 +0300
@@ -103,7 +103,7 @@
 		// transform = shearMatrixForPlane(renderer());
 		QMatrix4x4 transform = renderer()->currentCamera().transformationMatrix(1);
 		transform.scale(dist0);
-		transform.translate(translation);
+		offset(transform, translation);
 		model.emplace<LDCircularPrimitive>(PrimitiveModel::Circle, section.segments, section.divisions, transform);
 		finishDraw(model);
 		return;
@@ -114,7 +114,7 @@
 		//transform = shearMatrixForPlane(renderer());
 		QMatrix4x4 transform = renderer()->currentCamera().transformationMatrix(1);
 		transform.scale(max(dist0, dist1));
-		transform.translate(translation);
+		offset(transform, translation);
 		model.emplace<LDCircularPrimitive>(PrimitiveModel::Disc, section.segments, section.divisions, transform);
 		finishDraw(model);
 		return;
@@ -133,7 +133,7 @@
 			primitiveModel.ringNumber = component.num;
 			LDDocument* primitiveFile = primitives()->getPrimitive(primitiveModel);
 			QMatrix4x4 matrix = renderer()->currentCamera().transformationMatrix(component.scale);
-			matrix.translate(translation);
+			offset(matrix, translation);
 			// matrix = shearMatrixForPlane(renderer()) * matrix;
 			model.emplace<LDSubfileReference>(primitiveFile->name(), matrix);
 		}

mercurial