handle child destruction notifications in wxTLW itself and reset both normal and temporary default item pointers when the default window is destroyed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
BEGIN_EVENT_TABLE(wxTopLevelWindowBase, wxWindow)
|
||||
EVT_CLOSE(wxTopLevelWindowBase::OnCloseWindow)
|
||||
EVT_SIZE(wxTopLevelWindowBase::OnSize)
|
||||
EVT_WINDOW_DESTROY(wxTopLevelWindowBase::OnChildDestroy)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
// ============================================================================
|
||||
@@ -369,6 +370,17 @@ void wxTopLevelWindowBase::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
|
||||
Destroy();
|
||||
}
|
||||
|
||||
void wxTopLevelWindowBase::OnChildDestroy(wxWindowDestroyEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
wxWindow * const win = event.GetWindow();
|
||||
if ( win == m_winDefault )
|
||||
m_winDefault = NULL;
|
||||
if ( win == m_winTmpDefault )
|
||||
m_winTmpDefault = NULL;
|
||||
}
|
||||
|
||||
bool wxTopLevelWindowBase::SendIconizeEvent(bool iconized)
|
||||
{
|
||||
wxIconizeEvent event(GetId(), iconized);
|
||||
|
||||
Reference in New Issue
Block a user