Fix radius spline control point.

--HG--
branch : develop
This commit is contained in:
dismine 2014-06-09 21:27:18 +03:00
parent 695b357c4a
commit 3c3e29522e

View File

@ -36,10 +36,11 @@
VControlPointSpline::VControlPointSpline(const qint32 &indexSpline, SplinePoint::Position position, VControlPointSpline::VControlPointSpline(const qint32 &indexSpline, SplinePoint::Position position,
const QPointF &controlPoint, const QPointF &splinePoint, const QPointF &controlPoint, const QPointF &splinePoint,
QGraphicsItem *parent) QGraphicsItem *parent)
:QGraphicsEllipseItem(parent), radius(qApp->toPixel(1.5)), controlLine(nullptr), indexSpline(indexSpline), :QGraphicsEllipseItem(parent), radius(0), controlLine(nullptr), indexSpline(indexSpline),
position(position) position(position)
{ {
//create circle //create circle
radius = (1.5/*mm*/ / 25.4) * VApplication::PrintDPI;
QRectF rec = QRectF(0, 0, radius*2, radius*2); QRectF rec = QRectF(0, 0, radius*2, radius*2);
rec.translate(-rec.center().x(), -rec.center().y()); rec.translate(-rec.center().x(), -rec.center().y());
this->setRect(rec); this->setRect(rec);