mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 09:51:13 +02:00
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.
Origin commit data
------------------
Commit: 2f24e98252
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-01-24 (Tue, 24 Jan 2017)
This commit is contained in:
@@ -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);
|
//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));
|
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;
|
y += m_nFontTextHeight;
|
||||||
}
|
}
|
||||||
|
m_old_cText = m_cText;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTextBox::scrollPageDown(const int pages)
|
void CTextBox::scrollPageDown(const int pages)
|
||||||
|
Reference in New Issue
Block a user