Don't use a destroy event handler to disconnect the native control's delegate as the destroy event propagates and can cause the TLW to remove its delegate at unexpected times, such as when a child control is destroyed but the TLW remains active. Instead, do it in response to the Destroy() call.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier
2010-01-03 23:59:32 +00:00
parent d9edff064d
commit e2758e2175
2 changed files with 10 additions and 6 deletions

View File

@@ -103,6 +103,8 @@ public:
virtual void HandleResized( double timestampsec );
virtual void HandleMoved( double timestampsec );
virtual void HandleResizing( double timestampsec, wxRect* rect );
virtual bool Destroy();
protected:
// common part of all ctors
@@ -117,7 +119,7 @@ protected:
wxShowEffect effect,
unsigned timeout);
void OnWindowDestroy( wxWindowDestroyEvent &event);
virtual void WillBeDestroyed();
wxNonOwnedWindowImpl* m_nowpeer ;