X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9e691f46b2ec1b5dbbff2e51131e3c532e688a89..993eebf1bae0a595540cb282342e894f23fbb1ee:/src/gtk1/combobox.cpp diff --git a/src/gtk1/combobox.cpp b/src/gtk1/combobox.cpp index 3cd992283d..55cbde6983 100644 --- a/src/gtk1/combobox.cpp +++ b/src/gtk1/combobox.cpp @@ -601,29 +601,29 @@ void wxComboBox::OnChar( wxKeyEvent &event ) event.SetEventObject( this ); GetEventHandler()->ProcessEvent( event ); } - else - { - // This will invoke the dialog default action, such - // as the clicking the default button. + + // This will invoke the dialog default action, such + // as the clicking the default button. + + wxWindow *top_frame = m_parent; + while (top_frame->GetParent() && !(top_frame->IsTopLevel())) + top_frame = top_frame->GetParent(); - wxWindow *top_frame = m_parent; - while (top_frame->GetParent() && !(top_frame->IsTopLevel())) - top_frame = top_frame->GetParent(); - - if (top_frame && GTK_IS_WINDOW(top_frame->m_widget)) - { - GtkWindow *window = GTK_WINDOW(top_frame->m_widget); + if (top_frame && GTK_IS_WINDOW(top_frame->m_widget)) + { + GtkWindow *window = GTK_WINDOW(top_frame->m_widget); - if (window->default_widget) - { - gtk_widget_activate (window->default_widget); - return; - } + if (window->default_widget) + { + gtk_widget_activate (window->default_widget); + return; } } + + return; } } - + event.Skip(); }