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