CComponentsInfoBox: fix applying of properties

Some properties were not applied if cctext was already exists, eg. after
changed theme
This commit is contained in:
2014-10-26 23:47:43 +01:00
parent 04083bc299
commit 782c958bde

View File

@@ -137,8 +137,12 @@ void CComponentsInfoBox::paint(bool do_save_bg)
if (!ct_text.empty()){ if (!ct_text.empty()){
if (cctext) if (cctext)
delete cctext; delete cctext;
cctext = NULL;
}
if (cctext == NULL)
cctext = new CComponentsText(); cctext = new CComponentsText();
cctext->setText(ct_text, ct_text_mode, ct_font); cctext->setText(ct_text, ct_text_mode, ct_font);
cctext->doPaintTextBoxBg(ct_paint_textbg); cctext->doPaintTextBoxBg(ct_paint_textbg);
cctext->doPaintBg(false); cctext->doPaintBg(false);
@@ -154,5 +158,4 @@ void CComponentsInfoBox::paint(bool do_save_bg)
//paint, but set visibility mode //paint, but set visibility mode
cctext->allowPaint(cc_allow_paint); cctext->allowPaint(cc_allow_paint);
cctext->paint(CC_SAVE_SCREEN_NO); cctext->paint(CC_SAVE_SCREEN_NO);
}
} }