src/editmodes/abstractEditMode.cpp

changeset 1064
4c7a353cf583
parent 1063
1f15c52c11f6
child 1065
c8ecddbd99e9
equal deleted inserted replaced
1063:1f15c52c11f6 1064:4c7a353cf583
188 const QPointF& v0p, const QPointF& v1p) const 188 const QPointF& v0p, const QPointF& v1p) const
189 { 189 {
190 if (not m_config->drawLineLengths()) 190 if (not m_config->drawLineLengths())
191 return; 191 return;
192 192
193 const QString label = QString::number ((v1 - v0).length(), 'f', 2); 193 const QString label = QString::number(abs(v1 - v0), 'f', 2);
194 QPoint origin = QLineF (v0p, v1p).pointAt (0.5).toPoint(); 194 QPoint origin = QLineF (v0p, v1p).pointAt (0.5).toPoint();
195 painter.drawText (origin, label); 195 painter.drawText (origin, label);
196 } 196 }
197 197
198 void AbstractDrawMode::renderPolygon(QPainter& painter, const QVector<Vertex>& polygon3d, 198 void AbstractDrawMode::renderPolygon(QPainter& painter, const QVector<Vertex>& polygon3d,

mercurial