41 void RectangleMode::endDraw() |
41 void RectangleMode::endDraw() |
42 { |
42 { |
43 if (countof(m_drawedVerts) == 2) |
43 if (countof(m_drawedVerts) == 2) |
44 { |
44 { |
45 Model model {m_documents}; |
45 Model model {m_documents}; |
46 LDQuadrilateral* quad = model.emplace<LDQuadrilateral>(); |
46 LDQuadrilateral* quad = model.append<LDQuadrilateral>(); |
47 updateRectVerts(); |
47 updateRectVerts(); |
48 |
48 |
49 for (int i = 0; i < quad->numVertices(); ++i) |
49 for (int i = 0; i < quad->numVertices(); ++i) |
50 quad->setVertex(i, m_rectangleVerts[i]); |
50 quad->setVertex(i, m_rectangleVerts[i]); |
51 |
51 |