Elliptical arc is an independent scene object.
--HG-- branch : develop
This commit is contained in:
parent
f613a3a28f
commit
2f46634eff
|
@ -229,7 +229,10 @@ void DialogCurveIntersectAxis::ChosenObject(quint32 id, const SceneObject &type)
|
||||||
switch (number)
|
switch (number)
|
||||||
{
|
{
|
||||||
case (0):
|
case (0):
|
||||||
if (type == SceneObject::Spline || type == SceneObject::Arc || type == SceneObject::SplinePath)
|
if (type == SceneObject::Spline
|
||||||
|
|| type == SceneObject::Arc
|
||||||
|
|| type == SceneObject::ElArc
|
||||||
|
|| type == SceneObject::SplinePath)
|
||||||
{
|
{
|
||||||
if (SetObject(id, ui->comboBoxCurve, tr("Select axis point")))
|
if (SetObject(id, ui->comboBoxCurve, tr("Select axis point")))
|
||||||
{
|
{
|
||||||
|
|
|
@ -166,7 +166,10 @@ void DialogPointOfIntersectionCurves::ChosenObject(quint32 id, const SceneObject
|
||||||
{
|
{
|
||||||
if (prepare == false)// After first choose we ignore all objects
|
if (prepare == false)// After first choose we ignore all objects
|
||||||
{
|
{
|
||||||
if (type == SceneObject::Spline || type == SceneObject::Arc || type == SceneObject::SplinePath)
|
if (type == SceneObject::Spline
|
||||||
|
|| type == SceneObject::Arc
|
||||||
|
|| type == SceneObject::ElArc
|
||||||
|
|| type == SceneObject::SplinePath)
|
||||||
{
|
{
|
||||||
auto point = qobject_cast<VisToolPointOfIntersectionCurves *>(vis);
|
auto point = qobject_cast<VisToolPointOfIntersectionCurves *>(vis);
|
||||||
SCASSERT(point != nullptr);
|
SCASSERT(point != nullptr);
|
||||||
|
|
|
@ -585,7 +585,6 @@ QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GOType::Arc:
|
case GOType::Arc:
|
||||||
case GOType::EllipticalArc:
|
|
||||||
{
|
{
|
||||||
VSimpleCurve *curve = InitCurve(object.id, &(VAbstractTool::data), obj->getType());
|
VSimpleCurve *curve = InitCurve(object.id, &(VAbstractTool::data), obj->getType());
|
||||||
connect(curve, &VSimpleCurve::Choosed, [this](quint32 id)
|
connect(curve, &VSimpleCurve::Choosed, [this](quint32 id)
|
||||||
|
@ -594,6 +593,15 @@ QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case GOType::EllipticalArc:
|
||||||
|
{
|
||||||
|
VSimpleCurve *curve = InitCurve(object.id, &(VAbstractTool::data), obj->getType());
|
||||||
|
connect(curve, &VSimpleCurve::Choosed, [this](quint32 id)
|
||||||
|
{
|
||||||
|
emit ChoosedTool(id, SceneObject::ElArc);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
case GOType::Spline:
|
case GOType::Spline:
|
||||||
case GOType::CubicBezier:
|
case GOType::CubicBezier:
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,7 +74,7 @@ VToolEllipticalArc::VToolEllipticalArc(VAbstractPattern *doc, VContainer *data,
|
||||||
QGraphicsItem *parent)
|
QGraphicsItem *parent)
|
||||||
:VAbstractSpline(doc, data, id, parent)
|
:VAbstractSpline(doc, data, id, parent)
|
||||||
{
|
{
|
||||||
sceneType = SceneObject::Arc;
|
sceneType = SceneObject::ElArc;
|
||||||
|
|
||||||
this->setPath(ToolPath());
|
this->setPath(ToolPath());
|
||||||
this->setPen(QPen(Qt::black, qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor));
|
this->setPen(QPen(Qt::black, qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user