X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..2cfcf22d47b7d9cf3c85edfe498c5f23a18a9a19:/src/gtk1/combobox.cpp diff --git a/src/gtk1/combobox.cpp b/src/gtk1/combobox.cpp index 4b8aaa9de8..ee5fdba2a5 100644 --- a/src/gtk1/combobox.cpp +++ b/src/gtk1/combobox.cpp @@ -844,12 +844,12 @@ void wxComboBox::OnChar( wxKeyEvent &event ) if ( event.GetKeyCode() == WXK_RETURN ) { // GTK automatically selects an item if its in the list - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, GetId()); - event.SetString( GetValue() ); - event.SetInt( GetSelection() ); - event.SetEventObject( this ); + wxCommandEvent eventEnter(wxEVT_COMMAND_TEXT_ENTER, GetId()); + eventEnter.SetString( GetValue() ); + eventEnter.SetInt( GetSelection() ); + eventEnter.SetEventObject( this ); - if (!GetEventHandler()->ProcessEvent( event )) + if (!GetEventHandler()->ProcessEvent( eventEnter )) { // This will invoke the dialog default action, such // as the clicking the default button.