--- a/src/editmodes/drawMode.cpp Sat Jan 28 13:49:09 2017 +0200 +++ b/src/editmodes/drawMode.cpp Sat Jan 28 14:01:19 2017 +0200 @@ -38,7 +38,7 @@ poly << vert; // Draw the cursor vertex as the last one in the list. - if (poly.size() < 4) + if (length(poly) < 4) poly << getCursorVertex(); renderPolygon (painter, poly, true, true); @@ -51,7 +51,7 @@ { if (vert == pos) { - if (m_drawedVerts.size() >= 2) + if (length(m_drawedVerts) >= 2) endDraw(); return true; @@ -67,7 +67,7 @@ QList<Vertex>& verts = m_drawedVerts; LDObjectList objs; - switch (verts.size()) + switch (length(verts)) { case 2: { @@ -81,13 +81,13 @@ case 3: case 4: { - LDObject* obj = (verts.size() == 3) ? + LDObject* obj = (length(verts) == 3) ? static_cast<LDObject*> (LDSpawn<LDTriangle>()) : static_cast<LDObject*> (LDSpawn<LDQuad>()); obj->setColor (MainColor); - for (int i = 0; i < verts.size(); ++i) + for (int i = 0; i < length(verts); ++i) obj->setVertex (i, verts[i]); objs << obj;