From f9b5150a08df584ca6164462265c21c3bd97a31f Mon Sep 17 00:00:00 2001 From: Stefan Neis Date: Thu, 30 Mar 2000 15:17:04 +0000 Subject: [PATCH] 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 --- src/generic/gridsel.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/generic/gridsel.cpp b/src/generic/gridsel.cpp index 4566660ebf..bb0a3f9e31 100644 --- a/src/generic/gridsel.cpp +++ b/src/generic/gridsel.cpp @@ -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); }