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