diff --git a/src/libs/vtools/tools/drawTools/toolpoint/tooldoublepoint/vtooldoublepoint.cpp b/src/libs/vtools/tools/drawTools/toolpoint/tooldoublepoint/vtooldoublepoint.cpp index e0fc1ae3c..c0f7eee87 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/tooldoublepoint/vtooldoublepoint.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/tooldoublepoint/vtooldoublepoint.cpp @@ -165,20 +165,16 @@ void VToolDoublePoint::UpdateNamePosition(quint32 id) { if (id == p1id) { - VPointF *p1 = VAbstractTool::data.GeometricObject(p1id).data(); + const VPointF *p1 = VAbstractTool::data.GeometricObject(p1id).data(); - MoveDoubleLabel *moveLabel = new MoveDoubleLabel(doc, p1->mx(), p1->my(), DoublePoint::FirstPoint, this->id, - this->scene()); - connect(moveLabel, &MoveDoubleLabel::NeedLiteParsing, doc, &VAbstractPattern::LiteParseTree); + auto moveLabel = new MoveDoubleLabel(doc, p1->mx(), p1->my(), DoublePoint::FirstPoint, this->id, scene()); qApp->getUndoStack()->push(moveLabel); } else if (id == p2id) { - VPointF *p2 = VAbstractTool::data.GeometricObject(p2id).data(); + const VPointF *p2 = VAbstractTool::data.GeometricObject(p2id).data(); - MoveDoubleLabel *moveLabel = new MoveDoubleLabel(doc, p2->mx(), p2->my(), DoublePoint::SecondPoint, this->id, - this->scene()); - connect(moveLabel, &MoveDoubleLabel::NeedLiteParsing, doc, &VAbstractPattern::LiteParseTree); + auto moveLabel = new MoveDoubleLabel(doc, p2->mx(), p2->my(), DoublePoint::SecondPoint, this->id, scene()); qApp->getUndoStack()->push(moveLabel); } } diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolsinglepoint.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolsinglepoint.cpp index 38d484b70..5432ed334 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolsinglepoint.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolsinglepoint.cpp @@ -128,8 +128,7 @@ void VToolSinglePoint::NameChangePosition(const QPointF &pos) void VToolSinglePoint::UpdateNamePosition(quint32 id) { const QSharedPointer point = VAbstractTool::data.GeometricObject(id); - MoveLabel *moveLabel = new MoveLabel(doc, point->mx(), point->my(), id, this->scene()); - connect(moveLabel, &MoveLabel::NeedLiteParsing, doc, &VAbstractPattern::LiteParseTree); + auto moveLabel = new MoveLabel(doc, point->mx(), point->my(), id, scene()); qApp->getUndoStack()->push(moveLabel); } @@ -249,7 +248,8 @@ void VToolSinglePoint::RefreshLine(quint32 id) { Q_UNUSED(id) VAbstractTool::RefreshLine(this, namePoint, lineName, radius); - lineName->setPen(QPen(CorrectColor(Qt::black), qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor)); + lineName->setPen(QPen(CorrectColor(Qt::black), + qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor)); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/vabstracttool.cpp b/src/libs/vtools/tools/vabstracttool.cpp index a65cb5fe5..a44db4e0c 100644 --- a/src/libs/vtools/tools/vabstracttool.cpp +++ b/src/libs/vtools/tools/vabstracttool.cpp @@ -323,8 +323,8 @@ void VAbstractTool::AddRecord(const quint32 id, const Tool &toolType, VAbstractP /** * @brief RefreshLine refresh line to label on scene. */ -void VAbstractTool::RefreshLine(QGraphicsEllipseItem *point, VGraphicsSimpleTextItem *namePoint, QGraphicsLineItem *lineName, - const qreal radius) +void VAbstractTool::RefreshLine(QGraphicsEllipseItem *point, VGraphicsSimpleTextItem *namePoint, + QGraphicsLineItem *lineName, const qreal radius) { SCASSERT(point != nullptr); SCASSERT(namePoint != nullptr); @@ -336,7 +336,8 @@ void VAbstractTool::RefreshLine(QGraphicsEllipseItem *point, VGraphicsSimpleText { const QRectF nameRec = namePoint->sceneBoundingRect(); QPointF p1, p2; - VGObject::LineIntersectCircle(QPointF(), radius, QLineF(QPointF(), nameRec.center() - point->scenePos()), p1, p2); + VGObject::LineIntersectCircle(QPointF(), radius, QLineF(QPointF(), nameRec.center() - point->scenePos()), p1, + p2); const QPointF pRec = VGObject::LineIntersectRect(nameRec, QLineF(point->scenePos(), nameRec.center())); lineName->setLine(QLineF(p1, pRec - point->scenePos())); diff --git a/src/libs/vtools/undocommands/movedoublelabel.cpp b/src/libs/vtools/undocommands/movedoublelabel.cpp index c6ae63de9..88ead7b9c 100644 --- a/src/libs/vtools/undocommands/movedoublelabel.cpp +++ b/src/libs/vtools/undocommands/movedoublelabel.cpp @@ -176,8 +176,6 @@ void MoveDoubleLabel::Do(double mx, double my) doc->SetAttribute(domElement, AttrMx2, QString().setNum(qApp->fromPixel(mx))); doc->SetAttribute(domElement, AttrMy2, QString().setNum(qApp->fromPixel(my))); } - - emit NeedLiteParsing(Document::LitePPParse); } else { diff --git a/src/libs/vtools/undocommands/movelabel.cpp b/src/libs/vtools/undocommands/movelabel.cpp index e841c858f..bb1769752 100644 --- a/src/libs/vtools/undocommands/movelabel.cpp +++ b/src/libs/vtools/undocommands/movelabel.cpp @@ -119,8 +119,6 @@ void MoveLabel::Do(double mx, double my) { doc->SetAttribute(domElement, AttrMx, QString().setNum(qApp->fromPixel(mx))); doc->SetAttribute(domElement, AttrMy, QString().setNum(qApp->fromPixel(my))); - - emit NeedLiteParsing(Document::LitePPParse); } else {