Fixed exception catching when reading grainline formulas
--HG-- branch : feature
This commit is contained in:
parent
22d2f2275e
commit
568ecc01a6
|
@ -726,28 +726,11 @@ void VPattern::ParseDetailElement(const QDomElement &domElement, const Document
|
||||||
ptPos.setX(GetParametrDouble(element, AttrMx, "0"));
|
ptPos.setX(GetParametrDouble(element, AttrMx, "0"));
|
||||||
ptPos.setY(GetParametrDouble(element, AttrMy, "0"));
|
ptPos.setY(GetParametrDouble(element, AttrMy, "0"));
|
||||||
detail.GetGrainlineGeometry().SetPos(ptPos);
|
detail.GetGrainlineGeometry().SetPos(ptPos);
|
||||||
try
|
QString qsLength = GetParametrString(element, AttrLength, "0");
|
||||||
{
|
|
||||||
QString qsLength = GetParametrString(element, AttrLength);
|
|
||||||
detail.GetGrainlineGeometry().SetLength(qsLength);
|
detail.GetGrainlineGeometry().SetLength(qsLength);
|
||||||
}
|
QString qsRot = GetParametrString(element, VToolDetail::AttrRotation, "90");
|
||||||
catch (const VExceptionEmptyParameter& eep)
|
|
||||||
{
|
|
||||||
Q_UNUSED(eep);
|
|
||||||
detail.GetGrainlineGeometry().SetLength("0");
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
QString qsRot = GetParametrString(element, VToolDetail::AttrRotation);
|
|
||||||
detail.GetGrainlineGeometry().SetRotation(qsRot);
|
detail.GetGrainlineGeometry().SetRotation(qsRot);
|
||||||
}
|
}
|
||||||
catch(const VExceptionEmptyParameter& eep)
|
|
||||||
{
|
|
||||||
Q_UNUSED(eep);
|
|
||||||
detail.GetGrainlineGeometry().SetRotation("90");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
VToolDetail::Create(id, detail, sceneDetail, this, data, parse, Source::FromFile);
|
VToolDetail::Create(id, detail, sceneDetail, this, data, parse, Source::FromFile);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user