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

@ -2491,6 +2491,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)
{ {
@ -2507,6 +2509,11 @@ int VPattern::GetDefCustomHeight() const
{ {
return 0; return 0;
} }
}
else
{
return 0;
}
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -2542,6 +2549,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)
{ {
@ -2558,6 +2567,11 @@ int VPattern::GetDefCustomSize() const
{ {
return 0; return 0;
} }
}
else
{
return 0;
}
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------