X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1bd71df911439267fb2a006db571af3d45cdc4e5..c76b1a30faba8015cf9cb223cd0e01cb0d2f64d7:/src/generic/grid.cpp diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index a286e3706e..2f12b4028e 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -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);