Spline Path lost data about duplicate.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-03-22 17:04:32 +02:00
parent 08bf90bf48
commit 5ca119bb5b
3 changed files with 13 additions and 12 deletions

View File

@ -2312,12 +2312,6 @@ void VPattern::ParseToolSplinePath(VMainGraphicsScene *scene, const QDomElement
const QString color = GetParametrString(domElement, AttrColor, ColorBlack);
const quint32 duplicate = GetParametrUInt(domElement, AttrDuplicate, "0");
auto path = new VSplinePath();
if (duplicate > 0)
{
path->SetDuplicate(duplicate);
}
QVector<quint32> points;
QVector<QString> angle1, a1;
QVector<QString> angle2, a2;
@ -2351,8 +2345,8 @@ void VPattern::ParseToolSplinePath(VMainGraphicsScene *scene, const QDomElement
l1 = length1;
l2 = length2;
VToolSplinePath *spl = VToolSplinePath::Create(id, points, a1, a2, l1, l2, color, scene, this, data, parse,
Source::FromFile);
VToolSplinePath *spl = VToolSplinePath::Create(id, points, a1, a2, l1, l2, color, duplicate, scene, this, data,
parse, Source::FromFile);
if (spl != nullptr)
{

View File

@ -229,11 +229,17 @@ VToolSplinePath* VToolSplinePath::Create(const quint32 _id, VSplinePath *path, c
//---------------------------------------------------------------------------------------------------------------------
VToolSplinePath *VToolSplinePath::Create(const quint32 _id, const QVector<quint32> &points, QVector<QString> &a1,
QVector<QString> &a2, QVector<QString> &l1, QVector<QString> &l2,
const QString &color, VMainGraphicsScene *scene, VAbstractPattern *doc,
VContainer *data, const Document &parse, const Source &typeCreation)
const QString &color, quint32 duplicate, VMainGraphicsScene *scene,
VAbstractPattern *doc, VContainer *data, const Document &parse,
const Source &typeCreation)
{
auto path = new VSplinePath();
if (duplicate > 0)
{
path->SetDuplicate(duplicate);
}
for (int i = 0; i < points.size(); ++i)
{
const qreal calcAngle1 = CheckFormula(_id, a1[i], data);

View File

@ -62,8 +62,9 @@ public:
const Document &parse, const Source &typeCreation);
static VToolSplinePath *Create(const quint32 _id, const QVector<quint32> &points, QVector<QString> &a1,
QVector<QString> &a2, QVector<QString> &l1, QVector<QString> &l2,
const QString &color, VMainGraphicsScene *scene, VAbstractPattern *doc,
VContainer *data, const Document &parse, const Source &typeCreation);
const QString &color, quint32 duplicate, VMainGraphicsScene *scene,
VAbstractPattern *doc, VContainer *data, const Document &parse,
const Source &typeCreation);
static const QString ToolType;
static const QString OldToolType;
static void UpdatePathPoints(VAbstractPattern *doc, QDomElement &element, const VSplinePath &path);