diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index 9bc02ce26b..b00f4569da 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -1052,15 +1052,7 @@ public: // flicker // void BeginBatch() { m_batchCount++; } - void EndBatch() - { - if ( m_batchCount > 0 ) - { - m_batchCount--; - if ( !m_batchCount ) - Refresh(); - } - } + void EndBatch(); int GetBatchCount() { return m_batchCount; } diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index fc43074d6d..93a57af281 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -5127,12 +5127,6 @@ bool wxGrid::SendEvent( const wxEventType type, void wxGrid::OnPaint( wxPaintEvent& WXUNUSED(event) ) { wxPaintDC dc(this); // needed to prevent zillions of paint events on MSW - - CalcDimensions(); - m_rowLabelWin->Refresh(); - m_colLabelWin->Refresh(); - m_cornerLabelWin->Refresh(); - m_gridWin->Refresh(); } @@ -5928,6 +5922,24 @@ void wxGrid::GetTextBoxSize( wxDC& dc, *height = h; } +// +// ------ Batch processing. +// +void wxGrid::EndBatch() +{ + if ( m_batchCount > 0 ) + { + m_batchCount--; + if ( !m_batchCount ) + { + CalcDimensions(); + m_rowLabelWin->Refresh(); + m_colLabelWin->Refresh(); + m_cornerLabelWin->Refresh(); + m_gridWin->Refresh(); + } + } +} // // ------ Edit control functions