Removed unused QGraphicsLineItem item.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2016-02-12 21:43:33 +02:00
parent 1924b30f6f
commit 0405a54bf8
2 changed files with 8 additions and 11 deletions

View File

@ -38,9 +38,8 @@ const int EMPTY_ANGLE = -1;
VisToolSpline::VisToolSpline(const VContainer *data, QGraphicsItem *parent) VisToolSpline::VisToolSpline(const VContainer *data, QGraphicsItem *parent)
: VisPath(data, parent), : VisPath(data, parent),
object4Id(NULL_ID), object4Id(NULL_ID),
lineP1(nullptr), point1(nullptr),
lineP4(nullptr), point4(nullptr),
line(nullptr),
angle1(EMPTY_ANGLE), angle1(EMPTY_ANGLE),
angle2(EMPTY_ANGLE), angle2(EMPTY_ANGLE),
kAsm1(1), kAsm1(1),
@ -53,9 +52,8 @@ VisToolSpline::VisToolSpline(const VContainer *data, QGraphicsItem *parent)
p3(), p3(),
controlPoints() controlPoints()
{ {
lineP1 = InitPoint(supportColor, this); point1 = InitPoint(supportColor, this);
lineP4 = InitPoint(supportColor, this); //-V656 point4 = InitPoint(supportColor, this); //-V656
line = InitItem<QGraphicsLineItem>(mainColor, this);
auto *controlPoint1 = new VControlPointSpline(1, SplinePointPosition::FirstPoint, *data->GetPatternUnit(), this); auto *controlPoint1 = new VControlPointSpline(1, SplinePointPosition::FirstPoint, *data->GetPatternUnit(), this);
controlPoint1->hide(); controlPoint1->hide();
@ -79,7 +77,7 @@ void VisToolSpline::RefreshGeometry()
if (object1Id > NULL_ID) if (object1Id > NULL_ID)
{ {
const auto first = Visualization::data->GeometricObject<VPointF>(object1Id); const auto first = Visualization::data->GeometricObject<VPointF>(object1Id);
DrawPoint(lineP1, first->toQPointF(), supportColor); DrawPoint(point1, first->toQPointF(), supportColor);
if (mode == Mode::Creation) if (mode == Mode::Creation)
{ {
@ -110,7 +108,7 @@ void VisToolSpline::RefreshGeometry()
else else
{ {
const auto second = Visualization::data->GeometricObject<VPointF>(object4Id); const auto second = Visualization::data->GeometricObject<VPointF>(object4Id);
DrawPoint(lineP4, second->toQPointF(), supportColor); DrawPoint(point4, second->toQPointF(), supportColor);
if (mode == Mode::Creation) if (mode == Mode::Creation)
{ {

View File

@ -62,9 +62,8 @@ public slots:
protected: protected:
Q_DISABLE_COPY(VisToolSpline) Q_DISABLE_COPY(VisToolSpline)
quint32 object4Id; quint32 object4Id;
QGraphicsEllipseItem *lineP1; QGraphicsEllipseItem *point1;
QGraphicsEllipseItem *lineP4; QGraphicsEllipseItem *point4;
QGraphicsLineItem *line;
qreal angle1; qreal angle1;
qreal angle2; qreal angle2;
qreal kAsm1; qreal kAsm1;