git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12490
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
+ // free the old attribute
+ m_attrs[(size_t)n].attr->DecRef();
+
if ( attr )
{
// change the attribute
if ( attr )
{
// change the attribute
wxDefaultSize );
SetTargetWindow( m_gridWin );
wxDefaultSize );
SetTargetWindow( m_gridWin );
m_table->SetView( this );
m_ownTable = TRUE;
m_selection = new wxGridSelection( this, selmode );
m_table->SetView( this );
m_ownTable = TRUE;
m_selection = new wxGridSelection( this, selmode );
m_created = TRUE;
return m_created;
m_created = TRUE;
return m_created;
void wxGrid::SetSelectionMode(wxGrid::wxGridSelectionModes selmode)
{
void wxGrid::SetSelectionMode(wxGrid::wxGridSelectionModes selmode)
{
- if ( !m_created )
- {
- wxFAIL_MSG( wxT("Called wxGrid::SetSelectionMode() before calling CreateGrid()") );
- }
- else
- m_selection->SetSelectionMode( selmode );
+ wxCHECK_RET( m_created,
+ wxT("Called wxGrid::SetSelectionMode() before calling CreateGrid()") );
+
+ m_selection->SetSelectionMode( selmode );
}
bool wxGrid::SetTable( wxGridTableBase *table, bool takeOwnership,
}
bool wxGrid::SetTable( wxGridTableBase *table, bool takeOwnership,
if (takeOwnership)
m_ownTable = TRUE;
m_selection = new wxGridSelection( this, selmode );
if (takeOwnership)
m_ownTable = TRUE;
m_selection = new wxGridSelection( this, selmode );
m_extraWidth =
m_extraHeight = 50;
m_extraWidth =
m_extraHeight = 50;
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------