From: Julian Smart Date: Wed, 24 May 2006 13:41:12 +0000 (+0000) Subject: Don't unselect if setting string that's not found X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/615a96e37dd349bfee9b5b4e758d56a1a501ad97 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 --- diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index 8647a82611..4c011c1a7e 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -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); }