keep m_value in sync with real combobox value (set it initially and update it correctly in CBN_EDITCHANGE handler)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
162662e91c
commit
9a6bc6560b
@ -341,7 +341,7 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
|
||||
// want the new one)
|
||||
if ( sel == -1 )
|
||||
{
|
||||
m_value = GetValue();
|
||||
m_value = wxGetWindowText(GetHwnd());
|
||||
}
|
||||
else // we're synthesizing text updated event from sel change
|
||||
{
|
||||
@ -481,6 +481,7 @@ void wxComboBox::SetValue(const wxString& value)
|
||||
else
|
||||
SetWindowText(GetHwnd(), value.c_str());
|
||||
|
||||
m_value = value;
|
||||
m_selectionOld = GetSelection();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user