else
{
// ...or remove the attribute
- m_attrs[n].attr->DecRef();
+ // No need to DecRef the attribute itself since this is
+ // done be wxGridCellWithAttr's destructor!
m_attrs.RemoveAt(n);
n--; count--;
}
else
{
// ...or remove the attribute
- m_attrs[n].attr->DecRef();
+ // No need to DecRef the attribute itself since this is
+ // done be wxGridCellWithAttr's destructor!
m_attrs.RemoveAt(n);
n--; count--;
}
EndBatch();
}
+bool wxGrid::Enable(bool enable)
+{
+ if ( !wxScrolledWindow::Enable(enable) )
+ return false;
+
+ // redraw in the new state
+ m_gridWin->Refresh();
+
+ return true;
+}
//
// ------ Edit control functions
}
else
{
- rect = wxRect( 0, 0, 0, 0 );
+ rect = wxRect();
}
cellRect = CellToRect( bottomRight );
m_gridWin->GetClientSize( &cw, &ch );
if (right < 0 || bottom < 0 || left > cw || top > ch)
- return wxRect( 0, 0, 0, 0);
+ return wxRect();
rect.SetLeft( wxMax(0, left) );
rect.SetTop( wxMax(0, top) );