update the value shown in the combobox itself correctly in SetValue() (patch 1669275; bug 1667563) [backport from HEAD]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-03-07 23:47:54 +00:00
parent d4a260b03a
commit e2b383694b

View File

@@ -2191,16 +2191,18 @@ void wxComboCtrlBase::SetValueWithEvent(const wxString& value, bool withEvent)
m_text->SelectAll(); m_text->SelectAll();
} }
m_valueString = value;
Refresh();
// Since wxComboPopup may want to paint the combo as well, we need // Since wxComboPopup may want to paint the combo as well, we need
// to set the string value here (as well as sometimes in ShowPopup). // to set the string value here (as well as sometimes in ShowPopup).
if ( m_valueString != value && m_popupInterface ) if ( m_valueString != value )
{ {
m_valueString = value;
EnsurePopupControl();
m_popupInterface->SetStringValue(value); m_popupInterface->SetStringValue(value);
} }
Refresh();
} }
void wxComboCtrlBase::SetValue(const wxString& value) void wxComboCtrlBase::SetValue(const wxString& value)