src/editmodes/rectangleMode.cpp

changeset 1187
46dc716238fd
parent 1149
502c866b8512
equal deleted inserted replaced
1186:eae8b3bce545 1187:46dc716238fd
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

mercurial