Fixed issue #208. Point from X and Y needs vertical bar to help select point

for X vertical value.

--HG--
branch : develop
This commit is contained in:
dismine 2015-01-27 20:17:28 +02:00
parent c15c0ac67b
commit f8c62b9b25
2 changed files with 11 additions and 4 deletions

View File

@ -62,6 +62,7 @@ DialogPointOfIntersection::DialogPointOfIntersection(const VContainer *data, con
this, &DialogPointOfIntersection::PointNameChanged); this, &DialogPointOfIntersection::PointNameChanged);
line = new VisToolPointOfIntersection(data); 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)"))) if (SetObject(id, ui->comboBoxFirstPoint, tr("Select point for Y value (horizontal)")))
{ {
number++; number++;
line->VisualMode(id); line->setPoint1Id(id);
line->RefreshGeometry();
} }
break; break;
case 1: case 1:
@ -173,7 +175,6 @@ void DialogPointOfIntersection::ShowVisualization()
{ {
VMainGraphicsScene *scene = qApp->getCurrentScene(); VMainGraphicsScene *scene = qApp->getCurrentScene();
connect(scene, &VMainGraphicsScene::NewFactor, line, &VisLine::SetFactor); connect(scene, &VMainGraphicsScene::NewFactor, line, &VisLine::SetFactor);
scene->addItem(line);
line->RefreshGeometry(); line->RefreshGeometry();
} }
} }

View File

@ -48,12 +48,18 @@ VisToolPointOfIntersection::~VisToolPointOfIntersection()
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VisToolPointOfIntersection::RefreshGeometry() 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<VPointF> first = Visualization::data->GeometricObject<VPointF>(point1Id); const QSharedPointer<VPointF> first = Visualization::data->GeometricObject<VPointF>(point1Id);
DrawPoint(axisP1, first->toQPointF(), supportColor); DrawPoint(axisP1, first->toQPointF(), supportColor);
QLineF axisL1 = Axis(first->toQPointF(), 90); axisL1 = Axis(first->toQPointF(), 90);
DrawLine(this, axisL1, supportColor, Qt::DashLine); DrawLine(this, axisL1, supportColor, Qt::DashLine);
QLineF axisL2; QLineF axisL2;