Fixed issue #909. Valentina produces wrong united path.

(grafted from 6f13c33817dd37d3679398274e697e3da87dbbd0)

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-12-19 09:19:37 +02:00
parent d6bcdcdaf7
commit c782bf37db
2 changed files with 12 additions and 2 deletions

View file

@ -7,6 +7,7 @@
# Version 0.6.2 (unreleased)
- [#903] Bug in tool Cut Spline path.
- [#905] Valentina crashes with error: This id is not unique.
- [#909] Valentina produces wrong united path.
# Version 0.6.1 October 23, 2018
- [#885] Regression. Broken support for multi size measurements.

View file

@ -938,8 +938,17 @@ QVector<VPieceNode> VPiece::GetUnitedPath(const VContainer *data) const
continue;
}
const QVector<VPieceNode> midBefore = united.mid(0, indexStartPoint+1);
const QVector<VPieceNode> midAfter = united.mid(indexEndPoint, united.size() - midBefore.size());
QVector<VPieceNode> midBefore;
QVector<VPieceNode> midAfter;
if (indexStartPoint <= indexEndPoint)
{
midBefore = united.mid(0, indexStartPoint+1);
midAfter = united.mid(indexEndPoint, united.size() - midBefore.size());
}
else
{
midBefore = united.mid(indexEndPoint, indexStartPoint+1);
}
QVector<VPieceNode> customNodes = data->GetPiecePath(records.at(i).path).GetNodes();
if (records.at(i).reverse)