]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix Refresh() problem.
authorRobert Roebling <robert@roebling.de>
Wed, 19 Apr 2006 08:20:42 +0000 (08:20 +0000)
committerRobert Roebling <robert@roebling.de>
Wed, 19 Apr 2006 08:20:42 +0000 (08:20 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38833 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/datavgen.cpp

index 61de741c3ced2acb135678165206bfaca7e59efa..6ee454f6f32d7abe51527332d42e2c8d5659367e 100644 (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;