Clear attribute cache in Redimension to fix Bug 508407.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Neis
2002-09-01 16:34:17 +00:00
parent 7948c0c244
commit a679468530
2 changed files with 8 additions and 4 deletions

View File

@@ -3994,6 +3994,9 @@ bool wxGrid::Redimension( wxGridTableMessage& msg )
int i; int i;
bool result = FALSE; 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 0
// if we were using the default widths/heights so far, we must change them // if we were using the default widths/heights so far, we must change them
// now // now

View File

@@ -1538,7 +1538,7 @@ void wxGenericGrid::OnSelectCellImplementation(wxDC *dc, int row, int col)
HighlightCell(dc, TRUE); HighlightCell(dc, TRUE);
#endif #endif
} }
else else if (!wxIPE_HIGHLIGHT)
{ {
// 1) Why isn't this needed for Windows?? // 1) Why isn't this needed for Windows??
// Probably because of the SetValue?? JS. // 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 // 3) It *is* needed for Motif - michael
// //
#if defined(__WXMOTIF__) // 4) It *seems* to be needed whenever
if ((wxIPE_HIGHLIGHT || !(m_editable && m_editInPlace))) // wxIPE_HIGHLIGHT is not set (i.e.
// for both wxGTK and wxMOTIF)... SN.
if (!(m_editable && m_editInPlace)))
HighlightCell(dc, TRUE); HighlightCell(dc, TRUE);
#endif
} }
dc->DestroyClippingRegion(); dc->DestroyClippingRegion();