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:
@@ -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") );
|
||||||
|
Reference in New Issue
Block a user