It's valid to pass wxNOT_FOUND to SetSelection in order to clear selections.

Avoid assert and erroneous setting of -1.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-10-08 15:54:40 +00:00
parent 8adefcac72
commit a277deba22

View File

@@ -942,6 +942,7 @@ void wxListBox::DoSetSelection( int n, bool select )
{ {
// ... and not generate any events in the process // ... and not generate any events in the process
GtkDeselectAll(); GtkDeselectAll();
return;
} }
wxCHECK_RET( IsValid(n), wxT("invalid index in wxListBox::SetSelection") ); wxCHECK_RET( IsValid(n), wxT("invalid index in wxListBox::SetSelection") );