don't overwrite the existing attributes when setting one new one, i.e. SetItemBackgroundColour() after SetItemTextColour() doesn't reset the text colour to default one any more
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -790,10 +790,13 @@ bool wxListCtrl::SetItem(wxListItem& info)
|
|||||||
// attributes
|
// attributes
|
||||||
if ( info.HasAttributes() )
|
if ( info.HasAttributes() )
|
||||||
{
|
{
|
||||||
|
const wxListItemAttr& attrNew = *info.GetAttributes();
|
||||||
|
|
||||||
|
// don't overwrite the already set attributes if we have them
|
||||||
if ( data->attr )
|
if ( data->attr )
|
||||||
*data->attr = *info.GetAttributes();
|
data->attr->AssignFrom(attrNew);
|
||||||
else
|
else
|
||||||
data->attr = new wxListItemAttr(*info.GetAttributes());
|
data->attr = new wxListItemAttr(attrNew);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user