changed defaultitem method from belonging to a panel to any window
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -103,11 +103,11 @@ wxControl::~wxControl()
|
||||
m_isBeingDeleted = TRUE;
|
||||
// If we delete an item, we should initialize the parent panel,
|
||||
// because it could now be invalid.
|
||||
wxPanel *panel = wxDynamicCast(GetParent(), wxPanel);
|
||||
if ( panel )
|
||||
wxWindow *parent = GetParent() ;
|
||||
if ( parent )
|
||||
{
|
||||
if (panel->GetDefaultItem() == (wxButton*) this)
|
||||
panel->SetDefaultItem(NULL);
|
||||
if (parent->GetDefaultItem() == (wxButton*) this)
|
||||
parent->SetDefaultItem(NULL);
|
||||
}
|
||||
if ( m_macControl )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user