backmerged fix in wxListCtrl::SetItem and InsertItem -- changing attributes more than once had no effect
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -635,7 +635,12 @@ bool wxListCtrl::SetItem(wxListItem& info)
|
||||
// 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();
|
||||
|
||||
m_hasAnyAttr = TRUE;
|
||||
}
|
||||
@@ -1127,7 +1132,12 @@ long wxListCtrl::InsertItem(wxListItem& info)
|
||||
// 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();
|
||||
|
||||
m_hasAnyAttr = TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user