diff --git a/include/wx/dataview.h b/include/wx/dataview.h index 2f81131449..9b82fe23c7 100644 --- a/include/wx/dataview.h +++ b/include/wx/dataview.h @@ -986,7 +986,7 @@ public: void AppendItem( const wxVector &values, wxClientData *data = NULL ); void PrependItem( const wxVector &values, wxClientData *data = NULL ); void InsertItem( unsigned int row, const wxVector &values, wxClientData *data = NULL ); - void DeleteItem( unsigned pos ); + void DeleteItem( unsigned int pos ); void DeleteAllItems(); // override base virtuals diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index 74021deb98..17f3e911d3 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -1415,7 +1415,8 @@ void wxDataViewListStore::PrependItem( const wxVector &values, wxClie RowPrepended(); } -void wxDataViewListStore::InsertItem( unsigned int row, const wxVector &values, wxClientData *data ) +void wxDataViewListStore::InsertItem( unsigned int row, const wxVector &values, + wxClientData *data ) { wxDataViewListStoreLine *line = new wxDataViewListStoreLine( data ); line->m_values = values; @@ -1424,7 +1425,7 @@ void wxDataViewListStore::InsertItem( unsigned int row, const wxVector::iterator it = m_data.begin() + row; m_data.erase( it ); @@ -1441,6 +1442,8 @@ void wxDataViewListStore::DeleteAllItems() delete line; } + m_data.clear(); + Reset( 0 ); }