]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't unselect if setting string that's not found
authorJulian Smart <julian@anthemion.co.uk>
Wed, 24 May 2006 13:41:12 +0000 (13:41 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 24 May 2006 13:41:12 +0000 (13:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/univ/combobox.cpp

index 8647a82611455383deeb4e03b30ac034924e0ab1..4c011c1a7e1d34af4d75b6cfaa4e097b89d93274 100644 (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);
 }