Patch from Bo to show missing lines again
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
@@ -2693,7 +2693,7 @@ gboolean wxDataViewCtrlInternal::get_iter( GtkTreeIter *iter, GtkTreePath *path
|
||||
|
||||
unsigned int i = (unsigned int)gtk_tree_path_get_indices (path)[0];
|
||||
|
||||
if (i >= wx_model->GetLastIndex())
|
||||
if (i >= wx_model->GetLastIndex() + 1)
|
||||
return FALSE;
|
||||
|
||||
iter->stamp = m_gtk_model->stamp;
|
||||
@@ -2783,7 +2783,7 @@ gboolean wxDataViewCtrlInternal::iter_next( GtkTreeIter *iter )
|
||||
if (n == -1)
|
||||
return FALSE;
|
||||
|
||||
if (n >= (int) wx_model->GetLastIndex()-2)
|
||||
if (n >= (int) wx_model->GetLastIndex())
|
||||
return FALSE;
|
||||
|
||||
iter->user_data = (gpointer) ++n;
|
||||
@@ -2869,7 +2869,7 @@ gint wxDataViewCtrlInternal::iter_n_children( GtkTreeIter *iter )
|
||||
wxDataViewIndexListModel *wx_model = (wxDataViewIndexListModel*) m_wx_model;
|
||||
|
||||
if (iter == NULL)
|
||||
return (gint) wx_model->GetLastIndex()-1;
|
||||
return (gint) wx_model->GetLastIndex() + 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2901,7 +2901,7 @@ gboolean wxDataViewCtrlInternal::iter_nth_child( GtkTreeIter *iter, GtkTreeIter
|
||||
if (n < 0)
|
||||
return FALSE;
|
||||
|
||||
if (n >= (gint) wx_model->GetLastIndex()-1)
|
||||
if (n >= (gint) wx_model->GetLastIndex() + 1)
|
||||
return FALSE;
|
||||
|
||||
iter->stamp = m_gtk_model->stamp;
|
||||
|
Reference in New Issue
Block a user