Fixed exception catching when reading grainline formulas

--HG--
branch : feature
This commit is contained in:
BojanKverh 2016-10-23 22:04:14 +02:00
parent 22d2f2275e
commit 568ecc01a6

View file

@ -726,28 +726,11 @@ void VPattern::ParseDetailElement(const QDomElement &domElement, const Document
ptPos.setX(GetParametrDouble(element, AttrMx, "0"));
ptPos.setY(GetParametrDouble(element, AttrMy, "0"));
detail.GetGrainlineGeometry().SetPos(ptPos);
try
{
QString qsLength = GetParametrString(element, AttrLength);
QString qsLength = GetParametrString(element, AttrLength, "0");
detail.GetGrainlineGeometry().SetLength(qsLength);
}
catch (const VExceptionEmptyParameter& eep)
{
Q_UNUSED(eep);
detail.GetGrainlineGeometry().SetLength("0");
}
try
{
QString qsRot = GetParametrString(element, VToolDetail::AttrRotation);
QString qsRot = GetParametrString(element, VToolDetail::AttrRotation, "90");
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);