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 );
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<wxUIntPtr>(NULL);
return line->GetData();
wxDataViewTreeStoreContainerNode *parent_node = FindContainerNode( parent_item );
if (!parent_node) return;
- wxDataViewTreeStoreContainerNode *node = FindContainerNode( item );
- if (!node) return;
-
- parent_node->GetChildren().DeleteObject( node );
+ parent_node->GetChildren().DeleteObject( FindNode(item) );
}
void wxDataViewTreeStore::DeleteChildren( const wxDataViewItem& item )