diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index dc65ee909e..07d02c8dd4 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -3994,6 +3994,9 @@ bool wxGrid::Redimension( wxGridTableMessage& msg ) int i; bool result = FALSE; + // Clear the attribute cache as the attribute might refer to a different + // cell than stored in the cache after adding/removing rows/columns. + ClearAttrCache(); #if 0 // if we were using the default widths/heights so far, we must change them // now diff --git a/src/generic/gridg.cpp b/src/generic/gridg.cpp index 9de3b1897a..9611d4f61f 100644 --- a/src/generic/gridg.cpp +++ b/src/generic/gridg.cpp @@ -1538,7 +1538,7 @@ void wxGenericGrid::OnSelectCellImplementation(wxDC *dc, int row, int col) HighlightCell(dc, TRUE); #endif } - else + else if (!wxIPE_HIGHLIGHT) { // 1) Why isn't this needed for Windows?? // Probably because of the SetValue?? JS. @@ -1547,10 +1547,11 @@ void wxGenericGrid::OnSelectCellImplementation(wxDC *dc, int row, int col) // // 3) It *is* needed for Motif - michael // -#if defined(__WXMOTIF__) - if ((wxIPE_HIGHLIGHT || !(m_editable && m_editInPlace))) + // 4) It *seems* to be needed whenever + // wxIPE_HIGHLIGHT is not set (i.e. + // for both wxGTK and wxMOTIF)... SN. + if (!(m_editable && m_editInPlace))) HighlightCell(dc, TRUE); -#endif } dc->DestroyClippingRegion();