mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
CComponentsText: avoid unintentional overwriting of current property values
If parameters were not explicitly defined, default values of parameters overwrite current property values.
This commit is contained in:
@@ -184,8 +184,10 @@ void CComponentsText::setText(const std::string& stext, const int mode, Font* fo
|
||||
{
|
||||
ct_old_text = ct_text;
|
||||
ct_text = stext;
|
||||
ct_text_mode = mode;
|
||||
ct_font = font_text;
|
||||
if (mode != ~CTextBox::AUTO_WIDTH)
|
||||
ct_text_mode = mode;
|
||||
if (font_text)
|
||||
ct_font = font_text;
|
||||
if (color_text != 0)
|
||||
setTextColor(color_text);
|
||||
|
||||
|
Reference in New Issue
Block a user