src/editmodes/circleMode.cpp

changeset 1082
1738bdaf36d6
parent 1079
67c6e5d32e68
child 1088
c6d242d2b619
--- a/src/editmodes/circleMode.cpp	Sun Jan 29 21:17:43 2017 +0200
+++ b/src/editmodes/circleMode.cpp	Mon Jan 30 00:59:06 2017 +0200
@@ -125,10 +125,7 @@
 		{
 			primitiveModel.ringNumber = component.num;
 			primitiveFile = primitives()->getPrimitive(primitiveModel);
-			LDSubfileReference* ref = model.emplace<LDSubfileReference>();
-			ref->setFileInfo(primitiveFile);
-			ref->setTransformationMatrix(getCircleDrawMatrix(component.scale));
-			ref->setPosition(m_drawedVerts[0]);
+			model.emplace<LDSubfileReference>(primitiveFile, getCircleDrawMatrix(component.scale), m_drawedVerts.first());
 		}
 	}
 	else
@@ -172,13 +169,7 @@
 	}
 
 	if (circleOrDisc and primitiveFile)
-	{
-		LDSubfileReference* ref = model.emplace<LDSubfileReference>();
-		ref->setFileInfo (primitiveFile);
-		ref->setTransformationMatrix (transform);
-		ref->setPosition (m_drawedVerts[0]);
-		ref->setColor (MainColor);
-	}
+		model.emplace<LDSubfileReference>(primitiveFile, transform, m_drawedVerts.first());
 
 	if (not model.isEmpty())
 	{

mercurial