X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae090fdb7f4be47466b5728ad37065923b48c8c3..211cc8dc907ee50ca6d383b8df16bba9a4d3ce2d:/src/msw/combobox.cpp?ds=sidebyside diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index a7062aaff4..c5368a57d1 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -230,11 +230,13 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) case CBN_EDITCHANGE: { + wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, GetId()); // if sel != -1, value was initialized above (and we can't use // GetValue() here as it would return the old selection and we // want the new one) - wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, GetId()); - event.SetString(sel == -1 ? GetValue() : value); + if ( sel == -1 ) + value = GetValue(); + event.SetString(value); event.SetEventObject(this); ProcessCommand(event); }