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)
|
wxGridCellWithAttr& operator=(const wxGridCellWithAttr& other)
|
||||||
{
|
{
|
||||||
coords = other.coords;
|
coords = other.coords;
|
||||||
|
if (attr != other.attr)
|
||||||
|
{
|
||||||
attr->DecRef();
|
attr->DecRef();
|
||||||
attr = other.attr;
|
attr = other.attr;
|
||||||
attr->IncRef();
|
attr->IncRef();
|
||||||
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2766,6 +2768,9 @@ void wxGridRowOrColAttrData::SetAttr(wxGridCellAttr *attr, int rowOrCol)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
size_t n = (size_t)i;
|
size_t n = (size_t)i;
|
||||||
|
if ( m_attrs[n] == attr )
|
||||||
|
// nothing to do
|
||||||
|
return;
|
||||||
if ( attr )
|
if ( attr )
|
||||||
{
|
{
|
||||||
// change the attribute
|
// change the attribute
|
||||||
|
Reference in New Issue
Block a user