CComponentsPicture: add explicit methodes to set image position

This commit is contained in:
2017-04-16 16:53:06 +02:00
parent 069379930a
commit 5361296ff4
2 changed files with 23 additions and 0 deletions

View File

@@ -148,6 +148,24 @@ void CComponentsPicture::setHeight(const int& h, bool keep_aspect)
initCCItem();
}
void CComponentsPicture::setXPos(const int& xpos)
{
CComponentsItem::setXPos(xpos);
if (xpos == x)
return;
need_init = true;
initCCItem();
}
void CComponentsPicture::setYPos(const int& ypos)
{
CComponentsItem::setYPos(ypos);
if (ypos == y)
return;
need_init = true;
initCCItem();
}
void CComponentsPicture::initCCItem()
{
if (pic_name.empty() || !need_init){