mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
CComponentsInfoBox: move statement for check of image name
Ensure empty pic object otherwise it can be retained on exit
of paintPicture(), if an instance of Infobox already exists.
supplement to 095c0e1b04
This commit is contained in:
@@ -91,12 +91,16 @@ void CComponentsInfoBox::initVarInfobox()
|
|||||||
|
|
||||||
void CComponentsInfoBox::paintPicture()
|
void CComponentsInfoBox::paintPicture()
|
||||||
{
|
{
|
||||||
if (pic_name == "")
|
//ensure empty pic object
|
||||||
return;
|
|
||||||
|
|
||||||
//init and set icon paint position
|
|
||||||
if (pic)
|
if (pic)
|
||||||
delete pic;
|
delete pic;
|
||||||
|
pic = NULL;
|
||||||
|
|
||||||
|
//exit if no image definied
|
||||||
|
if (pic_name == "")
|
||||||
|
return;
|
||||||
|
|
||||||
|
//init pic object and set icon paint position
|
||||||
pic = new CComponentsPicture(x+fr_thickness+x_offset, y+fr_thickness/*+y_offset*/, 0, 0, "");
|
pic = new CComponentsPicture(x+fr_thickness+x_offset, y+fr_thickness/*+y_offset*/, 0, 0, "");
|
||||||
|
|
||||||
//define icon
|
//define icon
|
||||||
|
Reference in New Issue
Block a user