]> git.saurik.com Git - wxWidgets.git/commitdiff
fix rendering of wxGrid on wxMSW when a dialog is over the grid.
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Sun, 1 Mar 2009 17:21:46 +0000 (17:21 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Sun, 1 Mar 2009 17:21:46 +0000 (17:21 +0000)
To test the bug: open the "grid" sample and popup the about box, then move it over the grid; without this fix portions of wxGrid were painted as gray (disabled colour) even if the wxGrid itself was not disabled.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/gridctrl.cpp

index bec03a96ff35e9a819ab6844c611373407cf777e..1047bf8d997e586fd362a106744e0e6e637ebf23 100644 (file)
@@ -47,7 +47,7 @@ void wxGridCellRenderer::Draw(wxGrid& grid,
     dc.SetBackgroundMode( wxBRUSHSTYLE_SOLID );
 
     wxColour clr;
-    if ( grid.IsEnabled() )
+    if ( grid.IsThisEnabled() )
     {
         if ( isSelected )
         {
@@ -392,7 +392,7 @@ void wxGridCellStringRenderer::SetTextColoursAndFont(const wxGrid& grid,
     // TODO some special colours for attr.IsReadOnly() case?
 
     // different coloured text when the grid is disabled
-    if ( grid.IsEnabled() )
+    if ( grid.IsThisEnabled() )
     {
         if ( isSelected )
         {
@@ -743,7 +743,7 @@ void wxGridCellFloatRenderer::SetParameters(const wxString& params)
 
 wxSize wxGridCellBoolRenderer::ms_sizeCheckMark;
 
-wxSize wxGridCellBoolRenderer::GetBestSize(wxGrid& grid,
+wxSize wxGridCellBoolRenderer::GetBestSize(wxGrid& WXUNUSED(grid),
                                            wxGridCellAttr& WXUNUSED(attr),
                                            wxDC& WXUNUSED(dc),
                                            int WXUNUSED(row),