Fixed cell paint background refresh bug

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2002-12-18 12:53:49 +00:00
parent e01893d4ca
commit b819b854dd

View File

@ -203,6 +203,8 @@ public:
void ScrollWindow( int dx, int dy, const wxRect *rect );
wxGrid* GetOwner() { return m_owner; }
private:
wxGrid *m_owner;
wxGridRowLabelWindow *m_rowLabelWin;
@ -446,6 +448,10 @@ void wxGridCellEditor::PaintBackground(const wxRect& rectCell,
{
// erase the background because we might not fill the cell
wxClientDC dc(m_control->GetParent());
wxGridWindow* gridWindow = wxDynamicCast(m_control->GetParent(), wxGridWindow);
if (gridWindow)
gridWindow->GetOwner()->PrepareDC(dc);
dc.SetPen(*wxTRANSPARENT_PEN);
dc.SetBrush(wxBrush(attr->GetBackgroundColour(), wxSOLID));
dc.DrawRectangle(rectCell);