Clean a file. Tool Cut doesn't need color attribute anymore.
--HG-- branch : feature
This commit is contained in:
parent
123434f806
commit
f046624b36
|
@ -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
|
||||
{
|
||||
|
|
|
@ -78,6 +78,8 @@ private:
|
|||
|
||||
void ConvertMeasurementsToV0_2_1();
|
||||
|
||||
void RemoveColorToolCutV0_3_1();
|
||||
|
||||
QSet<QString> FixIncrementsToV0_2_0();
|
||||
QString FixIncrementInFormulaToV0_2_0(const QString &formula, const QSet<QString> &names);
|
||||
void FixPointExpressionsToV0_2_0(const QSet<QString> &names);
|
||||
|
|
Loading…
Reference in New Issue
Block a user