Added a deselection event for ClearSelection()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Neis
2000-03-30 15:17:04 +00:00
parent 24754f6ac2
commit f9b5150a08

View File

@@ -762,7 +762,6 @@ void wxGridSelection::ToggleCellSelection( int row, int col,
void wxGridSelection::ClearSelection()
{
// Should this send deselection events?
size_t n;
// deselect all invidiual cells and update the screen
@@ -825,6 +824,19 @@ void wxGridSelection::ClearSelection()
((wxWindow *)m_grid->m_gridWin)->Refresh( FALSE, &r );
}
}
// One deselection event, indicating deselection of _all_ cells.
// (No finer grained events for each of the smaller regions
// deselected above!)
wxGridRangeSelectEvent gridEvt( m_grid->GetId(),
wxEVT_GRID_RANGE_SELECT,
m_grid,
wxGridCellCoords( 0, 0 ),
wxGridCellCoords( m_grid->GetNumberRows() - 1,
m_grid->GetNumberCols() - 1 ),
FALSE );
m_grid->GetEventHandler()->ProcessEvent(gridEvt);
}