Fix regression with curve control length.

This commit is contained in:
Roman Telezhynskyi 2023-07-13 17:42:22 +03:00
parent 161918203a
commit ac25cc02df

View File

@ -33,6 +33,7 @@
#include <QSharedData>
#include <QtMath>
#include "../vmisc/vabstractvalapplication.h"
#include "vpointf.h"
QT_WARNING_PUSH
@ -107,12 +108,12 @@ inline VSplineData::VSplineData(const VPointF &p1, const VPointF &p4, qreal angl
QLineF p1p2(p1.x(), p1.y(), p1.x() + L * kAsm1, p1.y());
p1p2.setAngle(angle1);
c1Length = p1p2.length();
c1LengthF = QString().number(c1Length);
c1LengthF = QString::number(VAbstractValApplication::VApp()->fromPixel(c1Length));
QLineF p4p3(p4.x(), p4.y(), p4.x() + L * kAsm2, p4.y());
p4p3.setAngle(angle2);
c2Length = p4p3.length();
c2LengthF = QString().number(c2Length);
c2LengthF = QString::number(VAbstractValApplication::VApp()->fromPixel(c2Length));
}
//---------------------------------------------------------------------------------------------------------------------
@ -126,7 +127,7 @@ inline VSplineData::VSplineData(const VPointF &p1, QPointF p2, QPointF p3, const
angle1F = QString::number(angle1);
c1Length = p1p2.length();
c1LengthF = QString().number(c1Length);
c1LengthF = QString::number(VAbstractValApplication::VApp()->fromPixel(c1Length));
QLineF p4p3(static_cast<QPointF>(p4), static_cast<QPointF>(p3));
@ -134,7 +135,7 @@ inline VSplineData::VSplineData(const VPointF &p1, QPointF p2, QPointF p3, const
angle2F = QString::number(angle2);
c2Length = p4p3.length();
c2LengthF = QString().number(c2Length);
c2LengthF = QString::number(VAbstractValApplication::VApp()->fromPixel(c2Length));
}
//---------------------------------------------------------------------------------------------------------------------