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:
@@ -75,9 +75,9 @@ void wxListBoxBase::Set(int nItems, const wxString* items, void **clientData)
|
|||||||
|
|
||||||
bool wxListBoxBase::SetStringSelection(const wxString& s, bool select)
|
bool wxListBoxBase::SetStringSelection(const wxString& s, bool select)
|
||||||
{
|
{
|
||||||
int sel = FindString(s);
|
const int sel = FindString(s);
|
||||||
wxCHECK_MSG( sel != wxNOT_FOUND, false,
|
if ( sel == wxNOT_FOUND )
|
||||||
wxT("invalid string in SetStringSelection") );
|
return false;
|
||||||
|
|
||||||
SetSelection(sel, select);
|
SetSelection(sel, select);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user