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 ab59797ae5


Origin commit data
------------------
Commit: d7ce847471
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-04-06 (Sat, 06 Apr 2013)
This commit is contained in:
2013-04-06 08:49:16 +02:00
parent ab0e31bd05
commit 604d4e0f99

View File

@@ -91,12 +91,16 @@ void CComponentsInfoBox::initVarInfobox()
void CComponentsInfoBox::paintPicture()
{
if (pic_name == "")
return;
//init and set icon paint position
//ensure empty pic object
if (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, "");
//define icon