git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8164
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// check whether it has any custom attributes
if ( info.HasAttributes() )
{
// check whether it has any custom attributes
if ( info.HasAttributes() )
{
- delete m_attrs.Delete(item.iItem); // remove existing attributes
- m_attrs.Put(item.iItem, (wxObject *)new wxListItemAttr(*info.GetAttributes()));
+ wxListItemAttr *attr;
+ attr = (wxListItemAttr*) m_attrs.Get(item.iItem);
+ if (attr == NULL)
+ m_attrs.Put(item.iItem, (wxObject *)new wxListItemAttr(*info.GetAttributes()));
+ else *attr = *info.GetAttributes();
// check whether it has any custom attributes
if ( info.HasAttributes() )
{
// check whether it has any custom attributes
if ( info.HasAttributes() )
{
- m_attrs.Put(item.iItem, (wxObject *)new wxListItemAttr(*info.GetAttributes()));
+ wxListItemAttr *attr;
+ attr = (wxListItemAttr*) m_attrs.Get(item.iItem);
+ if (attr == NULL)
+ m_attrs.Put(item.iItem, (wxObject *)new wxListItemAttr(*info.GetAttributes()));
+ else *attr = *info.GetAttributes();