Return 0 if default height/size is not custom.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-12-12 13:15:29 +02:00
parent e8a93ddc2b
commit abb7147bc8

View file

@ -2490,6 +2490,8 @@ void VPattern::SetDefCustom(bool value)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
int VPattern::GetDefCustomHeight() const int VPattern::GetDefCustomHeight() const
{
if (IsDefCustom())
{ {
QDomNodeList tags = elementsByTagName(TagGradation); QDomNodeList tags = elementsByTagName(TagGradation);
if (tags.size() == 0) if (tags.size() == 0)
@ -2508,6 +2510,11 @@ int VPattern::GetDefCustomHeight() const
return 0; return 0;
} }
} }
else
{
return 0;
}
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VPattern::SetDefCustomHeight(int value) void VPattern::SetDefCustomHeight(int value)
@ -2541,6 +2548,8 @@ void VPattern::SetDefCustomHeight(int value)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
int VPattern::GetDefCustomSize() const int VPattern::GetDefCustomSize() const
{
if (IsDefCustom())
{ {
QDomNodeList tags = elementsByTagName(TagGradation); QDomNodeList tags = elementsByTagName(TagGradation);
if (tags.size() == 0) if (tags.size() == 0)
@ -2559,6 +2568,11 @@ int VPattern::GetDefCustomSize() const
return 0; return 0;
} }
} }
else
{
return 0;
}
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VPattern::SetDefCustomSize(int value) void VPattern::SetDefCustomSize(int value)