Fix conversion bug.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2017-01-23 14:03:07 +02:00
parent 3d835be3b7
commit 7817936d3e
2 changed files with 7 additions and 6 deletions

View File

@ -132,6 +132,7 @@ const QString strInLayout = QStringLiteral("inLayout");
const QString strSeamAllowance = QStringLiteral("seamAllowance"); const QString strSeamAllowance = QStringLiteral("seamAllowance");
const QString strNodeType = QStringLiteral("nodeType"); const QString strNodeType = QStringLiteral("nodeType");
const QString strDet = QStringLiteral("det"); const QString strDet = QStringLiteral("det");
const QString strTypeObject = QStringLiteral("typeObject");
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VPatternConverter::VPatternConverter(const QString &fileName) VPatternConverter::VPatternConverter(const QString &fileName)
@ -1716,9 +1717,9 @@ void VPatternConverter::TagRemoveAttributeTypeObjectInV0_4_0()
QDomElement domElement = domNode.toElement(); QDomElement domElement = domNode.toElement();
if (not domElement.isNull()) if (not domElement.isNull())
{ {
if (domElement.hasAttribute(strNodeType)) if (domElement.hasAttribute(strTypeObject))
{ {
domElement.removeAttribute(strNodeType); domElement.removeAttribute(strTypeObject);
} }
} }
domNode = domNode.nextSibling(); domNode = domNode.nextSibling();

View File

@ -580,8 +580,8 @@ QPointF VPiecePath::NodePreviousPoint(const VContainer *data, int i) const
{ {
const QSharedPointer<VAbstractCurve> curve = data->GeometricObject<VAbstractCurve>(node.GetId()); const QSharedPointer<VAbstractCurve> curve = data->GeometricObject<VAbstractCurve>(node.GetId());
const VSAPoint begin = StartSegment(data, d->m_nodes, i, node.GetReverse()); const VSAPoint begin = StartSegment(data, d->m_nodes, index, node.GetReverse());
const VSAPoint end = EndSegment(data, d->m_nodes, i, node.GetReverse()); const VSAPoint end = EndSegment(data, d->m_nodes, index, node.GetReverse());
const QVector<QPointF> points = curve->GetSegmentPoints(begin, end, node.GetReverse()); const QVector<QPointF> points = curve->GetSegmentPoints(begin, end, node.GetReverse());
if (points.size() > 1) if (points.size() > 1)
@ -631,8 +631,8 @@ QPointF VPiecePath::NodeNextPoint(const VContainer *data, int i) const
{ {
const QSharedPointer<VAbstractCurve> curve = data->GeometricObject<VAbstractCurve>(node.GetId()); const QSharedPointer<VAbstractCurve> curve = data->GeometricObject<VAbstractCurve>(node.GetId());
const VSAPoint begin = StartSegment(data, d->m_nodes, i, node.GetReverse()); const VSAPoint begin = StartSegment(data, d->m_nodes, index, node.GetReverse());
const VSAPoint end = EndSegment(data, d->m_nodes, i, node.GetReverse()); const VSAPoint end = EndSegment(data, d->m_nodes, index, node.GetReverse());
const QVector<QPointF> points = curve->GetSegmentPoints(begin, end, node.GetReverse()); const QVector<QPointF> points = curve->GetSegmentPoints(begin, end, node.GetReverse());
if (points.size() > 1) if (points.size() > 1)