src/editmodes/rectangleMode.cpp

changeset 1077
952d6b3e7d11
parent 1072
9ce9496427f2
child 1079
67c6e5d32e68
--- a/src/editmodes/rectangleMode.cpp	Sun Jan 29 15:28:48 2017 +0200
+++ b/src/editmodes/rectangleMode.cpp	Sun Jan 29 15:39:35 2017 +0200
@@ -41,14 +41,14 @@
 {
 	if (countof(m_drawedVerts) == 2)
 	{
-		LDQuad* quad = LDSpawn<LDQuad>();
+		Model model;
+		LDQuad* quad = model.emplace<LDQuad>();
 		updateRectVerts();
 
 		for (int i = 0; i < quad->numVertices(); ++i)
-			quad->setVertex (i, m_rectangleVerts[i]);
+			quad->setVertex(i, m_rectangleVerts[i]);
 
-		quad->setColor (MainColor);
-		finishDraw (LDObjectList ({quad}));
+		finishDraw(model);
 	}
 }
 

mercurial