--- a/src/editmodes/drawMode.cpp Sun Jan 29 15:49:36 2017 +0200 +++ b/src/editmodes/drawMode.cpp Sun Jan 29 21:02:11 2017 +0200 @@ -65,16 +65,14 @@ { // Clean the selection and create the object QList<Vertex>& verts = m_drawedVerts; - Model model; + Model model {m_documents}; switch (countof(verts)) { - case 2: - { + case 2: // 2 verts - make a line - LDLine* obj = model.emplace<LDLine>(verts[0], verts[1]); - break; - } + model.emplace<LDLine>(verts[0], verts[1]); + break; case 3: case 4: