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:
@@ -993,11 +993,11 @@ wxWindowMac::~wxWindowMac()
|
||||
// wxRemoveMacControlAssociation( this ) ;
|
||||
// If we delete an item, we should initialize the parent panel,
|
||||
// because it could now be invalid.
|
||||
wxWindow *parent = GetParent() ;
|
||||
if ( parent )
|
||||
wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow);
|
||||
if ( tlw )
|
||||
{
|
||||
if (parent->GetDefaultItem() == (wxButton*) this)
|
||||
parent->SetDefaultItem(NULL);
|
||||
if ( tlw->GetDefaultItem() == (wxButton*) this)
|
||||
tlw->SetDefaultItem(NULL);
|
||||
}
|
||||
|
||||
if ( m_peer && m_peer->Ok() )
|
||||
|
Reference in New Issue
Block a user