Improve export of increments into a pattern recipe.

Add support for separators.
This commit is contained in:
Roman Telezhynskyi 2020-12-05 14:50:55 +02:00
parent bb3cde292b
commit 7eb99f7a2f

View File

@ -174,7 +174,7 @@ QDomElement VPatternRecipe::Increments()
QDomElement increments = createElement(QStringLiteral("increments")); QDomElement increments = createElement(QStringLiteral("increments"));
VContainer data = m_pattern->GetCompleteData(); VContainer data = m_pattern->GetCompleteData();
QList<QSharedPointer<VIncrement>> patternIncrements = data.DataIncrements().values(); QList<QSharedPointer<VIncrement>> patternIncrements = data.DataIncrementsWithSeparators().values();
// Resore order // Resore order
std::sort(patternIncrements.begin(), patternIncrements.end(), std::sort(patternIncrements.begin(), patternIncrements.end(),
@ -198,7 +198,7 @@ QDomElement VPatternRecipe::PreviewCalculations()
QDomElement previewCalculations = createElement(QStringLiteral("previewCalculations")); QDomElement previewCalculations = createElement(QStringLiteral("previewCalculations"));
VContainer data = m_pattern->GetCompleteData(); VContainer data = m_pattern->GetCompleteData();
QList<QSharedPointer<VIncrement>> patternIncrements = data.DataIncrements().values(); QList<QSharedPointer<VIncrement>> patternIncrements = data.DataIncrementsWithSeparators().values();
// Resore order // Resore order
std::sort(patternIncrements.begin(), patternIncrements.end(), std::sort(patternIncrements.begin(), patternIncrements.end(),