diff --git a/docs/changes.txt b/docs/changes.txt index bfc9e7027a..6a85584e46 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -113,6 +113,7 @@ wxMac wxX11: - Don't crash in wxWindow dtor if the window hadn't been really Create()d +- Update wxChoice value when SetSelection() is called wxUniv: diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index febde2efc1..b615a9b537 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -389,8 +389,8 @@ void wxComboBox::SetSelection(int n) wxCHECK_RET( (n == wxNOT_FOUND || IsValid(n)), _T("invalid index in wxComboBox::Select") ); GetLBox()->SetSelection(n); - if ( GetTextCtrl() ) - GetTextCtrl()->SetValue(GetLBox()->GetString(n)); + + SetText(GetLBox()->GetString(n)); } int wxComboBox::GetSelection() const