]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/datavgen.cpp
Disable any refresh in backing window (set_back_pixmap( None ..) makes it transparent
[wxWidgets.git] / src / generic / datavgen.cpp
index 57d8ae6d58da1356ca0aa58b3267c462631b86ea..d7b2598ad18dc01b9121219c2f4e6c9010f78231 100644 (file)
@@ -1224,7 +1224,7 @@ void wxDataViewColumn::SetInternalWidth( int width )
 
 void wxDataViewColumn::SetWidth( int width )
 {
-    m_owner->m_headerArea->UpdateDisplay();
+    if (m_owner->m_headerArea) m_owner->m_headerArea->UpdateDisplay();
 
     SetInternalWidth(width);
 }
@@ -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
     {