Fix Refresh() problem.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38833 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2006-04-19 08:20:42 +00:00
parent 6cce68eaab
commit a87594c638

View File

@ -972,9 +972,9 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
wxDataViewListModel *model = GetOwner()->GetModel();
size_t item_start = wxMax( 0, (update.y / m_lineHeight) - 1 );
size_t item_count = wxMin( (update.height / m_lineHeight) + 2,
(int)(model->GetNumberOfRows()-item_start) );
size_t item_start = wxMax( 0, (update.y / m_lineHeight) );
size_t item_count = wxMin( ((update.y + update.height) / m_lineHeight) - item_start + 1,
(int)(model->GetNumberOfRows()-item_start) );
wxRect cell_rect;
cell_rect.x = 0;