From a87594c6388f7a6e96acc115c338627615493d7f Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Wed, 19 Apr 2006 08:20:42 +0000 Subject: [PATCH] Fix Refresh() problem. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38833 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/datavgen.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 61de741c3c..6ee454f6f3 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -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;