src/editmodes/drawMode.cpp

changeset 1079
67c6e5d32e68
parent 1077
952d6b3e7d11
child 1104
edddb9b0db9e
--- 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:

mercurial