fixed bug in wxFrame::OnActivate

(added virtual void RemoveChild() which make sure OnActivate
won't accidentally use invalid m_winLastFocused ptr)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2001-05-23 17:02:18 +00:00
parent faa20af7d4
commit de243b058f
2 changed files with 9 additions and 0 deletions

View File

@@ -61,6 +61,8 @@ public:
// override some more virtuals
virtual bool Show(bool show = TRUE);
virtual void RemoveChild( wxWindowBase *child );
// event handlers
void OnActivate(wxActivateEvent& event);
void OnSysColourChanged(wxSysColourChangedEvent& event);

View File

@@ -799,6 +799,13 @@ void wxFrame::OnActivate(wxActivateEvent& event)
}
}
void wxFrame::RemoveChild( wxWindowBase *child )
{
if ( child == m_winLastFocused )
m_winLastFocused = NULL;
wxFrameBase::RemoveChild(child);
}
// ----------------------------------------------------------------------------
// tool/status bar stuff
// ----------------------------------------------------------------------------