From 568ecc01a6c7ba0645510f7b337675bb98eca674 Mon Sep 17 00:00:00 2001 From: BojanKverh Date: Sun, 23 Oct 2016 22:04:14 +0200 Subject: [PATCH] Fixed exception catching when reading grainline formulas --HG-- branch : feature --- src/app/valentina/xml/vpattern.cpp | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index 8530de059..8dc43e38e 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -726,27 +726,10 @@ 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); - detail.GetGrainlineGeometry().SetLength(qsLength); - } - catch (const VExceptionEmptyParameter& eep) - { - Q_UNUSED(eep); - detail.GetGrainlineGeometry().SetLength("0"); - } - - try - { - QString qsRot = GetParametrString(element, VToolDetail::AttrRotation); - detail.GetGrainlineGeometry().SetRotation(qsRot); - } - catch(const VExceptionEmptyParameter& eep) - { - Q_UNUSED(eep); - detail.GetGrainlineGeometry().SetRotation("90"); - } + QString qsLength = GetParametrString(element, AttrLength, "0"); + detail.GetGrainlineGeometry().SetLength(qsLength); + QString qsRot = GetParametrString(element, VToolDetail::AttrRotation, "90"); + detail.GetGrainlineGeometry().SetRotation(qsRot); } } }