From 4ff9366dc1332abc371902059b71ea7d59aa2055 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 26 Apr 2007 02:13:08 +0000 Subject: [PATCH] don't assert in SetSelection(wxNOT_FOUND), just clear text zone contents (patch 1707475) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 4 ++++ src/mac/carbon/combobox.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index cf5a647967..ea366000be 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -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) diff --git a/src/mac/carbon/combobox.cpp b/src/mac/carbon/combobox.cpp index 734e631e28..eaf09763e2 100644 --- a/src/mac/carbon/combobox.cpp +++ b/src/mac/carbon/combobox.cpp @@ -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 -- 2.45.2