CTextBox: paint bg always if pixbuffer exists

Should prevent unintended possible overlap on multiple font render.
This commit is contained in:
2017-01-10 23:21:55 +01:00
committed by M. Liebmann
parent 6803a8dff3
commit 9b69803ca4

View File

@@ -601,11 +601,12 @@ void CTextBox::refreshText(void)
bool has_changed = hasChanged(&ax, &ay, &dx, &dy); bool has_changed = hasChanged(&ax, &ay, &dx, &dy);
//clean up possible screen on any changes //clean up possible screen on any changes
if (has_changed && m_bgpixbuf){ if (has_changed || m_bgpixbuf){
/*TODO/FIXME: in some cases could be required, that we must restore old saved screen. eg. if a text without bg was painted /*TODO/FIXME: in some cases could be required, that we must restore old saved screen. eg. if a text without bg was painted
* and another text should be painted as next on the same position like current text, but new text will be overpaint and is * and another text should be painted as next on the same position like current text, but new text will be overpaint and is
* not visible. It's currently solvable only with appropriate order of text items * not visible. It's currently solvable only with appropriate order of text items
*/ */
if (m_bgpixbuf)
frameBuffer->RestoreScreen(m_old_x, m_old_y, m_old_dx, m_old_dy, m_bgpixbuf); frameBuffer->RestoreScreen(m_old_x, m_old_y, m_old_dx, m_old_dy, m_bgpixbuf);
clearScreenBuffer(); clearScreenBuffer();
} }