CComponentsText: avoid unintentional overwriting of current property values

If parameters were not explicitly defined, default values of parameters
overwrite current property values.


Origin commit data
------------------
Branch: ni/coolstream
Commit: d2ae57e5b6
Author: Thilo Graf <dbt@novatux.de>
Date: 2015-02-22 (Sun, 22 Feb 2015)



------------------
This commit was generated by Migit
This commit is contained in:
2015-02-22 14:21:51 +01:00
parent 819cbeea7d
commit 380b76f079

View File

@@ -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);