Fixed issue #909. Valentina produces wrong united path.

--HG--
branch : release
This commit is contained in:
Roman Telezhynskyi 2018-12-19 09:19:37 +02:00
parent 559d79ff3e
commit a087e9ea74
2 changed files with 12 additions and 2 deletions

View File

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

View File

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