diff --git a/docs/changes.txt b/docs/changes.txt index e05f13fffe..df139d41d0 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -524,7 +524,14 @@ Major new features in this release was added. -2.9.4: (release 2012-07-09) +2.9.5: (released ????-??-??) + +All (GUI): + +- Fix item data access in wxDataViewListCtrl (Kry). + + +2.9.4: (released 2012-07-09) ------ INCOMPATIBLE CHANGES SINCE 2.9.3 diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index 1dcf8a1005..881fc24cd1 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -1768,7 +1768,7 @@ void wxDataViewListStore::DeleteAllItems() void wxDataViewListStore::SetItemData( const wxDataViewItem& item, wxUIntPtr data ) { - wxDataViewListStoreLine* line = m_data[wxPtrToUInt( item.GetID() ) - 1]; + wxDataViewListStoreLine* line = m_data[GetRow(item)]; if (!line) return; line->SetData( data ); @@ -1776,7 +1776,7 @@ void wxDataViewListStore::SetItemData( const wxDataViewItem& item, wxUIntPtr dat wxUIntPtr wxDataViewListStore::GetItemData( const wxDataViewItem& item ) const { - wxDataViewListStoreLine* line = m_data[wxPtrToUInt( item.GetID() ) - 1]; + wxDataViewListStoreLine* line = m_data[GetRow(item)]; if (!line) return static_cast(NULL); return line->GetData();