don't react to wxEVT_DESTROY events from child windows

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-02-08 15:20:37 +00:00
parent 78612fa68f
commit f61ea9468f

View File

@@ -60,8 +60,13 @@ private:
{ {
event.Skip(); event.Skip();
// this will delete this object itself // only react to the destruction of this object itself, not of any of
wxPersistenceManager::Get().SaveAndUnregister(GetWindow()); // its children
if ( event.GetEventObject() == GetObject() )
{
// this will delete this object itself
wxPersistenceManager::Get().SaveAndUnregister(GetWindow());
}
} }
wxDECLARE_NO_COPY_CLASS(wxPersistentWindowBase); wxDECLARE_NO_COPY_CLASS(wxPersistentWindowBase);