From 615a96e37dd349bfee9b5b4e758d56a1a501ad97 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 24 May 2006 13:41:12 +0000 Subject: [PATCH] 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 --- src/univ/combobox.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); } -- 2.45.2