Fixes.
--HG-- branch : feature
This commit is contained in:
parent
e37e2d48f3
commit
93a812af08
|
@ -223,6 +223,7 @@ void DialogPointOfIntersectionArcs::SaveData()
|
|||
|
||||
point->setArc1Id(GetFirstArcId());
|
||||
point->setArc2Id(GetSecondArcId());
|
||||
point->setCrossPoint(GetCrossArcPoint());
|
||||
point->RefreshGeometry();
|
||||
}
|
||||
|
||||
|
|
|
@ -56,12 +56,12 @@ void VisToolPointOfIntersectionArcs::RefreshGeometry()
|
|||
if (arc1Id > NULL_ID)
|
||||
{
|
||||
const QSharedPointer<VArc> arc1 = Visualization::data->GeometricObject<VArc>(arc1Id);
|
||||
DrawPath(arc1Path, arc1->GetPath(PathDirection::Hide), Qt::darkGreen, Qt::SolidLine, Qt::RoundCap);
|
||||
DrawPath(arc1Path, arc1->GetPath(PathDirection::Show), Qt::darkGreen, Qt::SolidLine, Qt::RoundCap);
|
||||
|
||||
if (arc2Id > NULL_ID)
|
||||
{
|
||||
const QSharedPointer<VArc> arc2 = Visualization::data->GeometricObject<VArc>(arc2Id);
|
||||
DrawPath(arc2Path, arc2->GetPath(PathDirection::Hide), Qt::darkRed, Qt::SolidLine, Qt::RoundCap);
|
||||
DrawPath(arc2Path, arc2->GetPath(PathDirection::Show), Qt::darkRed, Qt::SolidLine, Qt::RoundCap);
|
||||
|
||||
const QPointF fPoint = VToolPointOfIntersectionArcs::FindPoint(arc1.data(), arc2.data(), crossPoint);
|
||||
DrawPoint(point, fPoint, mainColor);
|
||||
|
|
|
@ -874,10 +874,13 @@ void VToolOptionsPropertyBrowser::ChangeDataToolPointOfIntersectionArcs(VPropert
|
|||
{
|
||||
case 0:
|
||||
cross = CrossArcsPoint::FirstPoint;
|
||||
break;
|
||||
case 1:
|
||||
cross = CrossArcsPoint::SecondPoint;
|
||||
break;
|
||||
default:
|
||||
cross = CrossArcsPoint::FirstPoint;
|
||||
break;
|
||||
}
|
||||
}
|
||||
i->SetCrossArcsPoint(cross);
|
||||
|
|
|
@ -1142,7 +1142,8 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, QDomElement &domElem
|
|||
<< VNodePoint::ToolType << VToolHeight::ToolType << VToolTriangle::ToolType
|
||||
<< VToolPointOfIntersection::ToolType << VToolCutSpline::ToolType
|
||||
<< VToolCutSplinePath::ToolType << VToolCutArc::ToolType
|
||||
<< VToolLineIntersectAxis::ToolType << VToolCurveIntersectAxis::ToolType;
|
||||
<< VToolLineIntersectAxis::ToolType << VToolCurveIntersectAxis::ToolType
|
||||
<< VToolPointOfIntersectionArcs::ToolType;
|
||||
switch (points.indexOf(type))
|
||||
{
|
||||
case 0: //VToolSinglePoint::ToolType
|
||||
|
@ -1633,6 +1634,26 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, QDomElement &domElem
|
|||
throw excep;
|
||||
}
|
||||
break;
|
||||
case 17: //VToolPointOfIntersectionArcs::ToolType
|
||||
try
|
||||
{
|
||||
PointsCommonAttributes(domElement, id, name, mx, my);
|
||||
const quint32 firstArcId = GetParametrUInt(domElement, VAbstractTool::AttrFirstArc, NULL_ID_STR);
|
||||
const quint32 secondArcId = GetParametrUInt(domElement, VAbstractTool::AttrSecondArc, NULL_ID_STR);
|
||||
const CrossArcsPoint crossPoint = static_cast<CrossArcsPoint>(GetParametrUInt(domElement,
|
||||
VAbstractTool::AttrCrossPoint,
|
||||
"1"));
|
||||
|
||||
VToolPointOfIntersectionArcs::Create(id, name, firstArcId, secondArcId, crossPoint, mx, my, scene, this,
|
||||
data, parse, Source::FromFile);
|
||||
}
|
||||
catch (const VExceptionBadId &e)
|
||||
{
|
||||
VExceptionObjectError excep(tr("Error creating or updating point of intersection arcs"), domElement);
|
||||
excep.AddMoreInformation(e.ErrorMessage());
|
||||
throw excep;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
qDebug() << "Illegal point type in VDomDocument::ParsePointElement().";
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue
Block a user