mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-26 09:56:32 +08:00
Avoid generating deselection events when there is no selection
Each time the grid cursor moves it calls wxGrid::ClearSelection() which calls wxGridSelection::ClearSelection(). the latter generates deselection event which makes no sense if there is no selection at all.
This commit is contained in:
@@ -11144,7 +11144,7 @@ wxArrayInt wxGrid::GetSelectedCols() const
|
||||
|
||||
void wxGrid::ClearSelection()
|
||||
{
|
||||
if ( m_selection )
|
||||
if ( IsSelection() )
|
||||
m_selection->ClearSelection();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user