X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4f819fe40a8061e1226f896564d70305ac83d2ba..3b28eaf5c3ff53c282281925b1c5fd5e64e71add:/src/gtk/button.cpp diff --git a/src/gtk/button.cpp b/src/gtk/button.cpp index 86b455462f..bc4dff9768 100644 --- a/src/gtk/button.cpp +++ b/src/gtk/button.cpp @@ -154,6 +154,11 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label, void wxButton::SetDefault() { + wxWindow *parent = GetParent(); + wxCHECK_RET( parent, _T("button without parent?") ); + + parent->SetDefaultItem(this); + GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT ); gtk_widget_grab_default( m_widget );