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:
@@ -2750,11 +2750,15 @@ void wxGridRowOrColAttrData::SetAttr(wxGridCellAttr *attr, int rowOrCol)
|
|||||||
{
|
{
|
||||||
int i = m_rowsOrCols.Index(rowOrCol);
|
int i = m_rowsOrCols.Index(rowOrCol);
|
||||||
if ( i == wxNOT_FOUND )
|
if ( i == wxNOT_FOUND )
|
||||||
|
{
|
||||||
|
if ( attr )
|
||||||
{
|
{
|
||||||
// add the attribute
|
// add the attribute
|
||||||
m_rowsOrCols.Add(rowOrCol);
|
m_rowsOrCols.Add(rowOrCol);
|
||||||
m_attrs.Add(attr);
|
m_attrs.Add(attr);
|
||||||
}
|
}
|
||||||
|
// nothing to remove
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
size_t n = (size_t)i;
|
size_t n = (size_t)i;
|
||||||
|
Reference in New Issue
Block a user