src/editmodes/circleMode.cpp

changeset 1263
0256edecda54
parent 1261
5d2c9d36da9d
child 1319
39d7a9642eea
equal deleted inserted replaced
1262:f6b253c17643 1263:0256edecda54
103 for (const RingFinder::Component& component : g_RingFinder.bestSolution()->getComponents()) 103 for (const RingFinder::Component& component : g_RingFinder.bestSolution()->getComponents())
104 { 104 {
105 primitiveModel.ringNumber = component.num; 105 primitiveModel.ringNumber = component.num;
106 primitiveFile = primitives()->getPrimitive(primitiveModel); 106 primitiveFile = primitives()->getPrimitive(primitiveModel);
107 Matrix matrix = Matrix::fromRotationMatrix(renderer()->currentCamera().transformationMatrix(component.scale)); 107 Matrix matrix = Matrix::fromRotationMatrix(renderer()->currentCamera().transformationMatrix(component.scale));
108 model.emplace<LDSubfileReference>(primitiveFile, matrix, m_drawedVerts.first()); 108 model.emplace<LDSubfileReference>(primitiveFile->name(), matrix, m_drawedVerts.first());
109 } 109 }
110 } 110 }
111 else 111 else
112 { 112 {
113 // Ring finder failed, last resort: draw the ring with quads 113 // Ring finder failed, last resort: draw the ring with quads
147 quad->setColor(MainColor); 147 quad->setColor(MainColor);
148 } 148 }
149 } 149 }
150 150
151 if (circleOrDisc and primitiveFile) 151 if (circleOrDisc and primitiveFile)
152 model.emplace<LDSubfileReference>(primitiveFile, transform, m_drawedVerts.first()); 152 model.emplace<LDSubfileReference>(primitiveFile->name(), transform, m_drawedVerts.first());
153 153
154 finishDraw (model); 154 finishDraw (model);
155 } 155 }
156 156
157 /* 157 /*

mercurial