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.
This commit is contained in:
2017-01-24 23:17:59 +01:00
committed by M. Liebmann
parent 81f26a327d
commit 2f24e98252

View File

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