move default button handling code from wxControlContainer to wxTLW (patch 1524441)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -165,10 +165,10 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label,
|
||||
|
||||
void wxButton::SetDefault()
|
||||
{
|
||||
wxWindow *parent = GetParent();
|
||||
wxCHECK_RET( parent, _T("button without parent?") );
|
||||
wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow);
|
||||
wxCHECK_RET( tlw, _T("button without top level window?") );
|
||||
|
||||
parent->SetDefaultItem(this);
|
||||
tlw->SetDefaultItem(this);
|
||||
|
||||
GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT );
|
||||
gtk_widget_grab_default( m_widget );
|
||||
|
Reference in New Issue
Block a user