Don't unselect if setting string that's not found

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-05-24 13:41:12 +00:00
parent 1c4743aa20
commit 615a96e37d

View File

@@ -130,8 +130,11 @@ wxString wxComboListBox::GetStringValue() const
void wxComboListBox::SetStringValue(const wxString& value)
{
if ( !value.empty() && (FindString(value) != wxNOT_FOUND) )
wxListBox::SetStringSelection(value);
if ( !value.empty() )
{
if (FindString(value) != wxNOT_FOUND)
wxListBox::SetStringSelection(value);
}
else
wxListBox::SetSelection(-1);
}