]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/datavgen.cpp
making ref counting behavior consistent, activating QD variante for polygon region...
[wxWidgets.git] / src / generic / datavgen.cpp
index 57d8ae6d58da1356ca0aa58b3267c462631b86ea..a21401fd6f8bb8fbb5f64fb5ec3eca989629ee6b 100644 (file)
@@ -2291,7 +2291,7 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
     unsigned int item_start = wxMax( 0, (update.y / m_lineHeight) );
     unsigned int item_count =
         wxMin( (int)(((update.y + update.height) / m_lineHeight) - item_start + 1),
-               (int)(GetRowCount( )- item_start) );
+               (int)(GetRowCount( ) - item_start));
     unsigned int item_last = item_start + item_count;
 
     // compute which columns needs to be redrawn
@@ -3157,7 +3157,11 @@ int wxDataViewMainWindow::RecalculateCount()
     if (!m_root)
     {
         wxDataViewIndexListModel *list_model = (wxDataViewIndexListModel*) GetOwner()->GetModel();
-        return list_model->GetLastIndex();
+#ifndef __WXMAC__
+        return list_model->GetLastIndex() + 1;
+#else
+        return list_model->GetLastIndex() - 1;
+#endif
     }
     else
     {