Fix reading/writing Full circumference.

This commit is contained in:
Roman Telezhynskyi 2020-10-01 19:03:28 +03:00
parent 4db0f3a420
commit 1ffbc0a720

View File

@ -513,7 +513,7 @@ void VMeasurements::SetReadOnly(bool ro)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
bool VMeasurements::IsFullCircumference() const bool VMeasurements::IsFullCircumference() const
{ {
QDomElement dimenstionsTag = firstChildElement(TagDimensions); QDomElement dimenstionsTag = documentElement().firstChildElement(TagDimensions);
if (not dimenstionsTag.isNull()) if (not dimenstionsTag.isNull())
{ {
return GetParametrBool(dimenstionsTag, AttrFullCircumference, falseStr); return GetParametrBool(dimenstionsTag, AttrFullCircumference, falseStr);
@ -529,7 +529,7 @@ bool VMeasurements::IsFullCircumference() const
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VMeasurements::SetFullCircumference(bool fc) void VMeasurements::SetFullCircumference(bool fc)
{ {
QDomElement dimenstionsTag = firstChildElement(TagDimensions); QDomElement dimenstionsTag = documentElement().firstChildElement(TagDimensions);
if (not dimenstionsTag.isNull()) if (not dimenstionsTag.isNull())
{ {
SetAttributeOrRemoveIf(dimenstionsTag, AttrFullCircumference, fc, not fc); SetAttributeOrRemoveIf(dimenstionsTag, AttrFullCircumference, fc, not fc);