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