src/editmodes/abstractEditMode.cpp

changeset 1008
74cb432812d3
parent 1006
a6b462051ae0
child 1012
413ecd6b9801
equal deleted inserted replaced
1006:a6b462051ae0 1008:74cb432812d3
152 return true; 152 return true;
153 } 153 }
154 154
155 if (data.releasedButtons & Qt::LeftButton) 155 if (data.releasedButtons & Qt::LeftButton)
156 { 156 {
157 if (m_drawedVerts.size() >= maxVertices()) 157 if (maxVertices() and m_drawedVerts.size() >= maxVertices())
158 { 158 {
159 endDraw(); 159 endDraw();
160 return true; 160 return true;
161 } 161 }
162 162
212 painter.drawPolygon (QPolygonF (poly)); 212 painter.drawPolygon (QPolygonF (poly));
213 213
214 // Draw vertex blips 214 // Draw vertex blips
215 for (int i = 0; i < poly3d.size(); ++i) 215 for (int i = 0; i < poly3d.size(); ++i)
216 { 216 {
217 QPoint& blip = poly[i]; 217 renderer()->drawBlip (painter, poly[i]);
218 painter.setPen (renderer()->linePen()); 218 renderer()->drawBlipCoordinates (painter, poly3d[i], poly[i]);
219 renderer()->drawBlip (painter, blip);
220
221 // Draw their coordinates
222 painter.setPen (renderer()->textPen());
223 painter.drawText (blip.x(), blip.y() - 8, poly3d[i].toString (true));
224 } 219 }
225 220
226 // Draw line lenghts and angle info if appropriate 221 // Draw line lenghts and angle info if appropriate
227 if (poly3d.size() >= 2 and (withlengths or withangles)) 222 if (poly3d.size() >= 2 and (withlengths or withangles))
228 { 223 {

mercurial