update the combobox text as soon as we get CBN_SELENDOK as otherwise wxEVT_COMMAND_COMBOBOX_SELECTED handler got wrong value from our GetValue()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -321,6 +321,12 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD id)
|
||||
// CBN_EDITCHANGE below
|
||||
sel = GetSelection();
|
||||
value = GetStringSelection();
|
||||
|
||||
// this string is going to become the new combobox value soon but
|
||||
// we need it to be done right now, otherwise the event handler
|
||||
// could get a wrong value when it calls our GetValue()
|
||||
::SetWindowText(GetHwnd(), value);
|
||||
|
||||
{
|
||||
wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, GetId());
|
||||
event.SetInt(sel);
|
||||
|
Reference in New Issue
Block a user