]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed cell paint background refresh bug
authorJulian Smart <julian@anthemion.co.uk>
Wed, 18 Dec 2002 12:53:49 +0000 (12:53 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 18 Dec 2002 12:53:49 +0000 (12:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/grid.cpp

index a286e3706e38dce9110cc106a994952f4db82ec2..2f12b4028e4fa2befab24167fec0a82e3aff4b55 100644 (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);