--- 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); } }