Draw line lengths to 2 decimal points only.

Sun, 16 Oct 2016 18:28:56 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Sun, 16 Oct 2016 18:28:56 +0300
changeset 1041
9fc08b73b8c4
parent 1040
3301cf2ea7ff
child 1042
b54b78ac41a5

Draw line lengths to 2 decimal points only.

src/editmodes/abstractEditMode.cpp file | annotate | diff | comparison | revisions
--- a/src/editmodes/abstractEditMode.cpp	Sun Oct 16 17:54:42 2016 +0300
+++ b/src/editmodes/abstractEditMode.cpp	Sun Oct 16 18:28:56 2016 +0300
@@ -193,7 +193,7 @@
 	if (not m_config->drawLineLengths())
 		return;
 
-	const QString label = QString::number ((v1 - v0).length());
+	const QString label = QString::number ((v1 - v0).length(), 'f', 2);
 	QPoint origin = QLineF (v0p, v1p).pointAt (0.5).toPoint();
 	painter.drawText (origin, label);
 }

mercurial