CComponentsPicture: add explicit methodes to set image position

Origin commit data
------------------
Commit: 5361296ff4
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-04-16 (Sun, 16 Apr 2017)
This commit is contained in:
2017-04-16 16:53:06 +02:00
parent c6f91f5b67
commit eca35b1bcb
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){