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:
ali kettab
2022-09-12 18:55:03 +01:00
parent 6ea4bae9e3
commit 958e39e3f3
+1 -1
View File
@@ -11144,7 +11144,7 @@ wxArrayInt wxGrid::GetSelectedCols() const
void wxGrid::ClearSelection()
{
if ( m_selection )
if ( IsSelection() )
m_selection->ClearSelection();
}