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:
@@ -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);
|
||||
|
@@ -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
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user