From 2f24e982521faec904b5c1f09d510a5d98e68a80 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 24 Jan 2017 23:17:59 +0100 Subject: [PATCH] CTextBox: fix m_old_cText update after text paint refreshText() executes loop also for text with more than one line and m_old_cText attribut should be updated only if loop is ready. Otherwise in text boxes with more than one line, only first line would be painted. --- src/gui/widget/textbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index e21b7aac1..54968c03c 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -720,9 +720,9 @@ void CTextBox::refreshText(void) //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) m_pcFontText->RenderString(tx, ty, tw, m_cLineArray[i].c_str(), m_textColor, 0, m_renderMode | ((m_utf8_encoded) ? Font::IS_UTF8 : 0)); - m_old_cText = m_cText; y += m_nFontTextHeight; } + m_old_cText = m_cText; } void CTextBox::scrollPageDown(const int pages)