diff --git a/src/libs/ifc/xml/vpatternconverter.cpp b/src/libs/ifc/xml/vpatternconverter.cpp index 961d1251c..5068702ef 100644 --- a/src/libs/ifc/xml/vpatternconverter.cpp +++ b/src/libs/ifc/xml/vpatternconverter.cpp @@ -318,6 +318,7 @@ void VPatternConverter::ToV0_3_0() void VPatternConverter::ToV0_3_1() { SetVersion(QStringLiteral("0.3.1")); + RemoveColorToolCutV0_3_1(); Save(); } @@ -782,6 +783,26 @@ void VPatternConverter::ConvertMeasurementsToV0_2_1() ConvertPathPointExpressionsToV0_2_0(names); } +//--------------------------------------------------------------------------------------------------------------------- +void VPatternConverter::RemoveColorToolCutV0_3_1() +{ + const QDomNodeList list = elementsByTagName("point"); + for (int i=0; i < list.size(); ++i) + { + QDomElement element = list.at(i).toElement(); + if (not element.isNull()) + { + const QString type = element.attribute(QStringLiteral("type")); + if (type == QStringLiteral("cutArc") || + type == QStringLiteral("cutSpline") || + type == QStringLiteral("cutSplinePath")) + { + element.removeAttribute(QStringLiteral("color")); + } + } + } +} + //--------------------------------------------------------------------------------------------------------------------- QString VPatternConverter::MUnitV0_1_4() const { diff --git a/src/libs/ifc/xml/vpatternconverter.h b/src/libs/ifc/xml/vpatternconverter.h index 96bdcd864..55be6f196 100644 --- a/src/libs/ifc/xml/vpatternconverter.h +++ b/src/libs/ifc/xml/vpatternconverter.h @@ -78,6 +78,8 @@ private: void ConvertMeasurementsToV0_2_1(); + void RemoveColorToolCutV0_3_1(); + QSet FixIncrementsToV0_2_0(); QString FixIncrementInFormulaToV0_2_0(const QString &formula, const QSet &names); void FixPointExpressionsToV0_2_0(const QSet &names);