From 8f6e2ca65a34c41ac554138a4ad327af50de0d6f Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 25 Mar 2013 20:23:35 +0100 Subject: [PATCH] CComponentsInfoBox: ensure new init of picture Delete causes a clean background because it is possible that remnants are left after changed font size. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/9af63bdc72b5fb6fea7cbb8ebd2a94b4fa630007 Author: Thilo Graf Date: 2013-03-25 (Mon, 25 Mar 2013) ------------------ This commit was generated by Migit --- src/gui/components/cc_item_infobox.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gui/components/cc_item_infobox.cpp b/src/gui/components/cc_item_infobox.cpp index c8e5987de..04eac2e54 100644 --- a/src/gui/components/cc_item_infobox.cpp +++ b/src/gui/components/cc_item_infobox.cpp @@ -92,10 +92,9 @@ void CComponentsInfoBox::initVarInfobox() void CComponentsInfoBox::paintPicture() { //init and set icon paint position - if (pic == NULL) - pic = new CComponentsPicture(x+fr_thickness+x_offset, y+fr_thickness/*+y_offset*/, 0, 0, ""); - pic->setXPos(x+fr_thickness+x_offset); - pic->setYPos(y+fr_thickness); + if (pic) + delete pic; + pic = new CComponentsPicture(x+fr_thickness+x_offset, y+fr_thickness/*+y_offset*/, 0, 0, ""); //define icon pic->setPicture(pic_name);