Call wxTLW::SetDefaultItem() from wxButtonBase::SetDefault() instead of doing
it in wxButton implementations in (almost) all ports; changed its return type to "wxWindow *" from "void" to accommodate the ports needing the old default item (replaces part of patch 1696563) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45338 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -233,17 +233,15 @@ bool wxButton::SendClickEvent()
|
||||
|
||||
void wxButton::SetDefault()
|
||||
{
|
||||
wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow);
|
||||
|
||||
wxCHECK_RET( tlw, _T("button without top level window?") );
|
||||
|
||||
//
|
||||
// Set this one as the default button both for wxWidgets and Windows
|
||||
//
|
||||
wxWindow* pWinOldDefault = tlw->SetDefaultItem(this);
|
||||
wxWindow* pWinOldDefault = wxButtonBase::Set();
|
||||
|
||||
SetDefaultStyle( wxDynamicCast(pWinOldDefault, wxButton), false);
|
||||
SetDefaultStyle( this, true );
|
||||
|
||||
return pWinOldDefault;
|
||||
} // end of wxButton::SetDefault
|
||||
|
||||
void wxButton::SetTmpDefault()
|
||||
|
Reference in New Issue
Block a user