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:
@@ -341,7 +341,7 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
|
|||||||
// want the new one)
|
// want the new one)
|
||||||
if ( sel == -1 )
|
if ( sel == -1 )
|
||||||
{
|
{
|
||||||
m_value = GetValue();
|
m_value = wxGetWindowText(GetHwnd());
|
||||||
}
|
}
|
||||||
else // we're synthesizing text updated event from sel change
|
else // we're synthesizing text updated event from sel change
|
||||||
{
|
{
|
||||||
@@ -481,6 +481,7 @@ void wxComboBox::SetValue(const wxString& value)
|
|||||||
else
|
else
|
||||||
SetWindowText(GetHwnd(), value.c_str());
|
SetWindowText(GetHwnd(), value.c_str());
|
||||||
|
|
||||||
|
m_value = value;
|
||||||
m_selectionOld = GetSelection();
|
m_selectionOld = GetSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user