don't assert in SetStringSelection() if the item isn't found for consistency with wxItemContainerImmutable

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2006-07-04 00:31:52 +00:00
parent 1294722aa6
commit 956689757d

View File

@ -75,9 +75,9 @@ void wxListBoxBase::Set(int nItems, const wxString* items, void **clientData)
bool wxListBoxBase::SetStringSelection(const wxString& s, bool select)
{
int sel = FindString(s);
wxCHECK_MSG( sel != wxNOT_FOUND, false,
wxT("invalid string in SetStringSelection") );
const int sel = FindString(s);
if ( sel == wxNOT_FOUND )
return false;
SetSelection(sel, select);