]> git.saurik.com Git - wxWidgets.git/commitdiff
don't assert in SetSelection(wxNOT_FOUND), just clear text zone contents (patch 1707475)
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 26 Apr 2007 02:13:08 +0000 (02:13 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 26 Apr 2007 02:13:08 +0000 (02:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/mac/carbon/combobox.cpp

index cf5a6479671e7db7ff42404df06c81afeb57917b..ea366000be32f3066647094de402139d40d5a972 100644 (file)
@@ -177,6 +177,10 @@ wxGTK:
 - Fix wxNO_BORDER style for wxRadioBox (David Hart)
 - Fix wxTextCtrl::GetLineText() for empty lines (Marcin Wojdyr)
 
+wxMac:
+
+- Fix wxComboBox::SetSelection(wxNOT_FOUND) (Adrian Secord)
+
 wxUniv:
 
 - Fix wxTextCtrl::SetSelection(-1, -1) to behave as documented (Anders Larsen)
index 734e631e288566789124016d560ffc5f019e8d80..eaf09763e2fc61e85e69cd1fc87e95414886e52a 100644 (file)
@@ -576,7 +576,7 @@ void wxComboBox::SetSelection(int n)
     m_choice->SetSelection( n );
 
     if ( m_text != NULL )
-        m_text->SetValue(GetString(n));
+        m_text->SetValue(n != wxNOT_FOUND ? GetString(n) : wxString(wxEmptyString));
 }
 
 int wxComboBox::FindString(const wxString& s, bool bCase) const