Erase the column label background in wxGrid to avoid display artefacts.

Apparently the column label text is not always drawn correctly when double
buffering is used, so erase the background completely before drawing the text.

Unfortunately this might result in flicker but presumably correct display is
more important.

Closes #12055.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64375 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-05-21 13:17:30 +00:00
parent 417b8fcc49
commit b5e97a17b1

View File

@@ -5572,6 +5572,11 @@ void wxGrid::DrawColLabel(wxDC& dc, int col)
}
else
{
// It is reported that we need to erase the background to avoid display
// artefacts, see #12055.
wxDCBrushChanger setBrush(dc, m_colWindow->GetBackgroundColour());
dc.DrawRectangle(rect);
rend.DrawBorder(*this, dc, rect);
}