Reduce size of virtual list before sending out delete notification, fixes #10966: wxDataViewVirtualListModel row deletion bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -535,13 +535,15 @@ void wxDataViewVirtualListModel::RowAppended()
|
||||
|
||||
void wxDataViewVirtualListModel::RowDeleted( unsigned int row )
|
||||
{
|
||||
m_size--;
|
||||
wxDataViewItem item( wxUIntToPtr(row+1) );
|
||||
wxDataViewModel::ItemDeleted( wxDataViewItem(0), item );
|
||||
m_size--;
|
||||
}
|
||||
|
||||
void wxDataViewVirtualListModel::RowsDeleted( const wxArrayInt &rows )
|
||||
{
|
||||
m_size -= rows.GetCount();
|
||||
|
||||
wxArrayInt sorted = rows;
|
||||
sorted.Sort( my_sort );
|
||||
|
||||
@@ -553,8 +555,6 @@ void wxDataViewVirtualListModel::RowsDeleted( const wxArrayInt &rows )
|
||||
array.Add( item );
|
||||
}
|
||||
wxDataViewModel::ItemsDeleted( wxDataViewItem(0), array );
|
||||
|
||||
m_size -= rows.GetCount();
|
||||
}
|
||||
|
||||
void wxDataViewVirtualListModel::RowChanged( unsigned int row )
|
||||
|
||||
Reference in New Issue
Block a user