From f8c62b9b25721eaab7cdc4b01d0d6862851f5288 Mon Sep 17 00:00:00 2001 From: dismine Date: Tue, 27 Jan 2015 20:17:28 +0200 Subject: [PATCH] Fixed issue #208. Point from X and Y needs vertical bar to help select point for X vertical value. --HG-- branch : develop --- src/app/dialogs/tools/dialogpointofintersection.cpp | 5 +++-- src/app/visualization/vistoolpointofintersection.cpp | 10 ++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/app/dialogs/tools/dialogpointofintersection.cpp b/src/app/dialogs/tools/dialogpointofintersection.cpp index c3b4dc425..5f565ddeb 100644 --- a/src/app/dialogs/tools/dialogpointofintersection.cpp +++ b/src/app/dialogs/tools/dialogpointofintersection.cpp @@ -62,6 +62,7 @@ DialogPointOfIntersection::DialogPointOfIntersection(const VContainer *data, con this, &DialogPointOfIntersection::PointNameChanged); line = new VisToolPointOfIntersection(data); + line->VisualMode(NULL_ID); } //--------------------------------------------------------------------------------------------------------------------- @@ -103,7 +104,8 @@ void DialogPointOfIntersection::ChosenObject(quint32 id, const SceneObject &type if (SetObject(id, ui->comboBoxFirstPoint, tr("Select point for Y value (horizontal)"))) { number++; - line->VisualMode(id); + line->setPoint1Id(id); + line->RefreshGeometry(); } break; case 1: @@ -173,7 +175,6 @@ void DialogPointOfIntersection::ShowVisualization() { VMainGraphicsScene *scene = qApp->getCurrentScene(); connect(scene, &VMainGraphicsScene::NewFactor, line, &VisLine::SetFactor); - scene->addItem(line); line->RefreshGeometry(); } } diff --git a/src/app/visualization/vistoolpointofintersection.cpp b/src/app/visualization/vistoolpointofintersection.cpp index 85c84af8a..6427eb3f3 100644 --- a/src/app/visualization/vistoolpointofintersection.cpp +++ b/src/app/visualization/vistoolpointofintersection.cpp @@ -48,12 +48,18 @@ VisToolPointOfIntersection::~VisToolPointOfIntersection() //--------------------------------------------------------------------------------------------------------------------- void VisToolPointOfIntersection::RefreshGeometry() { - if (point1Id > NULL_ID) + QLineF axisL1; + if (point1Id <= NULL_ID) + { + axisL1 = Axis(Visualization::scenePos, 90); + DrawLine(this, axisL1, supportColor, Qt::DashLine); + } + else { const QSharedPointer first = Visualization::data->GeometricObject(point1Id); DrawPoint(axisP1, first->toQPointF(), supportColor); - QLineF axisL1 = Axis(first->toQPointF(), 90); + axisL1 = Axis(first->toQPointF(), 90); DrawLine(this, axisL1, supportColor, Qt::DashLine); QLineF axisL2;