Fixed problems with reassigning the already assigned attribute, see #9567.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54244 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -83,10 +83,12 @@ struct wxGridCellWithAttr
|
||||
wxGridCellWithAttr& operator=(const wxGridCellWithAttr& other)
|
||||
{
|
||||
coords = other.coords;
|
||||
attr->DecRef();
|
||||
attr = other.attr;
|
||||
attr->IncRef();
|
||||
|
||||
if (attr != other.attr)
|
||||
{
|
||||
attr->DecRef();
|
||||
attr = other.attr;
|
||||
attr->IncRef();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -2766,6 +2768,9 @@ void wxGridRowOrColAttrData::SetAttr(wxGridCellAttr *attr, int rowOrCol)
|
||||
else
|
||||
{
|
||||
size_t n = (size_t)i;
|
||||
if ( m_attrs[n] == attr )
|
||||
// nothing to do
|
||||
return;
|
||||
if ( attr )
|
||||
{
|
||||
// change the attribute
|
||||
|
Reference in New Issue
Block a user