Since it is documented, changed GetOrCreateCellAttr from protected to

public so it can be used from wxPython.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-09-03 19:30:19 +00:00
parent 9a8a6d250f
commit 71e60f703c
4 changed files with 30 additions and 16 deletions

View File

@@ -9097,9 +9097,10 @@ wxGridCellAttr *wxGrid::GetCellAttr(int row, int col) const
wxGridCellAttr *wxGrid::GetOrCreateCellAttr(int row, int col) const
{
wxGridCellAttr *attr = (wxGridCellAttr *)NULL;
bool canHave = ((wxGrid*)this)->CanHaveAttributes();
wxCHECK_MSG( m_table, attr,
_T("we may only be called if CanHaveAttributes() returned true and then m_table should be !NULL") );
wxCHECK_MSG( canHave, attr, _T("Cell attributes not allowed"));
wxCHECK_MSG( m_table, attr, _T("must have a table") );
attr = m_table->GetAttr(row, col, wxGridCellAttr::Cell);
if ( !attr )