From e483cc2b093e7738ceaae602f8eaf52d87c4afd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Br=C3=A6strup=20Sayoc?= Date: Sun, 26 Dec 2021 00:56:24 +0100 Subject: [PATCH] Use latest user input for Add Cosmetic Vertex --- src/Mod/TechDraw/Gui/TaskCosVertex.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/Mod/TechDraw/Gui/TaskCosVertex.cpp b/src/Mod/TechDraw/Gui/TaskCosVertex.cpp index d5532159cd..5c94bbe9ab 100644 --- a/src/Mod/TechDraw/Gui/TaskCosVertex.cpp +++ b/src/Mod/TechDraw/Gui/TaskCosVertex.cpp @@ -86,8 +86,7 @@ TaskCosVertex::TaskCosVertex(TechDraw::DrawViewPart* baseFeat, m_btnOK(nullptr), m_btnCancel(nullptr), m_pbTrackerState(TRACKERPICK), - m_savePoint(QPointF(0.0,0.0)), - pointFromTracker(false) + m_savePoint(QPointF(0.0,0.0)) { if ( (m_basePage == nullptr) || (m_baseFeat == nullptr) ) { @@ -263,7 +262,6 @@ void TaskCosVertex::onTrackerFinished(std::vector pts, QGIView* qgParen QPointF scenePosCV = displace / scale; m_savePoint = Rez::appX(scenePosCV); - pointFromTracker = true; updateUi(); m_tracker->sleep(true); @@ -325,14 +323,11 @@ bool TaskCosVertex::accept() if (!doc) return false; removeTracker(); - if (pointFromTracker) { - addCosVertex(m_savePoint); - } else { - double x = ui->dsbX->value().getValue(); - double y = ui->dsbY->value().getValue(); - QPointF uiPoint(x,-y); - addCosVertex(uiPoint); - } + double x = ui->dsbX->value().getValue(); + double y = ui->dsbY->value().getValue(); + QPointF uiPoint(x,-y); + addCosVertex(uiPoint); + m_baseFeat->recomputeFeature(); m_baseFeat->requestPaint(); m_mdi->setContextMenuPolicy(m_saveContextPolicy);