m_table->SetView( this );
m_ownTable = TRUE;
Init();
+ m_selection = new wxGridSelection( this, selmode );
m_created = TRUE;
}
- m_selection = new wxGridSelection( this, selmode );
return m_created;
}
m_selection->SetSelectionMode( selmode );
}
-bool wxGrid::SetTable( wxGridTableBase *table, bool takeOwnership )
+bool wxGrid::SetTable( wxGridTableBase *table, bool takeOwnership,
+ wxGrid::wxGridSelectionModes selmode )
{
if ( m_created )
{
// View at runtime. Is there anything in the implmentation that would
// prevent this?
+ // At least, you now have to copy with m_selection
wxFAIL_MSG( wxT("wxGrid::CreateGrid or wxGrid::SetTable called more than once") );
return FALSE;
}
if (takeOwnership)
m_ownTable = TRUE;
Init();
+ m_selection = new wxGridSelection( this, selmode );
m_created = TRUE;
}
if ( m_selectingTopLeft != wxGridNoCellCoords &&
m_selectingBottomRight != wxGridNoCellCoords )
{
- m_selection->SelectBlock( m_selectingTopLeft.GetRow(),
- m_selectingTopLeft.GetCol(),
- m_selectingBottomRight.GetRow(),
- m_selectingBottomRight.GetCol() );
+ m_selection->SelectBlock( m_selectingTopLeft.GetRow(),
+ m_selectingTopLeft.GetCol(),
+ m_selectingBottomRight.GetRow(),
+ m_selectingBottomRight.GetCol() );
if (m_winCapture)
{
m_winCapture->ReleaseMouse();