corrected bug with m_selection not being initialized in CreateGrid() and SetTable()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3194,8 +3194,8 @@ bool wxGrid::CreateGrid( int numRows, int numCols,
|
|||||||
m_table = new wxGridStringTable( m_numRows, m_numCols );
|
m_table = new wxGridStringTable( m_numRows, m_numCols );
|
||||||
m_table->SetView( this );
|
m_table->SetView( this );
|
||||||
m_ownTable = TRUE;
|
m_ownTable = TRUE;
|
||||||
Init();
|
|
||||||
m_selection = new wxGridSelection( this, selmode );
|
m_selection = new wxGridSelection( this, selmode );
|
||||||
|
Init();
|
||||||
m_created = TRUE;
|
m_created = TRUE;
|
||||||
}
|
}
|
||||||
return m_created;
|
return m_created;
|
||||||
@@ -3234,8 +3234,8 @@ bool wxGrid::SetTable( wxGridTableBase *table, bool takeOwnership,
|
|||||||
m_table->SetView( this );
|
m_table->SetView( this );
|
||||||
if (takeOwnership)
|
if (takeOwnership)
|
||||||
m_ownTable = TRUE;
|
m_ownTable = TRUE;
|
||||||
Init();
|
|
||||||
m_selection = new wxGridSelection( this, selmode );
|
m_selection = new wxGridSelection( this, selmode );
|
||||||
|
Init();
|
||||||
m_created = TRUE;
|
m_created = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user