don't store NULL attribute in wxGridRowOrColAttrData::SetAttr() unnecessarily

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-10-21 21:27:56 +00:00
parent 065ae02d48
commit 62d249cb22

View File

@@ -2751,9 +2751,13 @@ void wxGridRowOrColAttrData::SetAttr(wxGridCellAttr *attr, int rowOrCol)
int i = m_rowsOrCols.Index(rowOrCol);
if ( i == wxNOT_FOUND )
{
// add the attribute
m_rowsOrCols.Add(rowOrCol);
m_attrs.Add(attr);
if ( attr )
{
// add the attribute
m_rowsOrCols.Add(rowOrCol);
m_attrs.Add(attr);
}
// nothing to remove
}
else
{