From f453a2380481ada0fad4d5ebce8c395a12934d5c Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 7 Feb 2017 15:04:51 +0100 Subject: [PATCH] CTextBox: compare condition for text render more precisely Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/95de68c5a5725ac919c40b2092413d2b0fc62d6b Author: Thilo Graf Date: 2017-02-07 (Tue, 07 Feb 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/widget/textbox.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index 54968c03c..bc2fcac5a 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -657,6 +657,7 @@ void CTextBox::refreshText(void) if (allow_paint_bg){ //TRACE("[CTextBox] %s restore bg %d\r\n", __FUNCTION__, __LINE__); frameBuffer->RestoreScreen(ax, ay, dx, dy, m_bgpixbuf); + m_bg_painted = true; } } } @@ -718,7 +719,7 @@ void CTextBox::refreshText(void) frameBuffer->paintBoxRel(tx, ty-th, tw, th, COL_RED, m_nBgRadius, m_nBgRadiusType); #endif //TRACE("[CTextBox] %s Line %d m_cFrame.iX %d m_cFrameTextRel.iX %d\r\n", __FUNCTION__, __LINE__, m_cFrame.iX, m_cFrameTextRel.iX); - if (m_bg_painted || m_old_cText != m_cText) + if (m_bg_painted || (m_old_cText != m_cText)) m_pcFontText->RenderString(tx, ty, tw, m_cLineArray[i].c_str(), m_textColor, 0, m_renderMode | ((m_utf8_encoded) ? Font::IS_UTF8 : 0)); y += m_nFontTextHeight; }