Fixed saving grainline formulas when grainline is set to not visible
--HG-- branch : feature
This commit is contained in:
parent
e82f65fc6a
commit
5862264a1d
|
@ -726,16 +726,23 @@ void VPattern::ParseDetailElement(const QDomElement &domElement, const Document
|
|||
ptPos.setX(GetParametrDouble(element, AttrMx, "0"));
|
||||
ptPos.setY(GetParametrDouble(element, AttrMy, "0"));
|
||||
detail.GetGrainlineGeometry().SetPos(ptPos);
|
||||
if (detail.GetGrainlineGeometry().IsVisible() == true)
|
||||
try
|
||||
{
|
||||
QString qsLength = GetParametrString(element, AttrLength);
|
||||
detail.GetGrainlineGeometry().SetLength(qsLength);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
detail.GetGrainlineGeometry().SetLength("");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
QString qsRot = GetParametrString(element, VToolDetail::AttrRotation);
|
||||
detail.GetGrainlineGeometry().SetRotation(qsRot);
|
||||
}
|
||||
else
|
||||
catch(...)
|
||||
{
|
||||
detail.GetGrainlineGeometry().SetLength("");
|
||||
detail.GetGrainlineGeometry().SetRotation("");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -208,11 +208,8 @@ void SaveDetailOptions::SaveGrainline(QDomElement &domElement, const VDetail &de
|
|||
doc->SetAttribute(domData, VAbstractPattern::AttrVisible, glGeom.IsVisible() == true? trueStr : falseStr);
|
||||
doc->SetAttribute(domData, AttrMx, glGeom.GetPos().x());
|
||||
doc->SetAttribute(domData, AttrMy, glGeom.GetPos().y());
|
||||
if (glGeom.IsVisible() == true)
|
||||
{
|
||||
doc->SetAttribute(domData, AttrLength, glGeom.GetLength());
|
||||
doc->SetAttribute(domData, VToolDetail::AttrRotation, glGeom.GetRotation());
|
||||
}
|
||||
|
||||
domElement.appendChild(domData);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user