]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed ~wxWindowBase to remove associated context help from wxHelpProvider -- otherwis...
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 29 Feb 2008 21:11:21 +0000 (21:11 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 29 Feb 2008 21:11:21 +0000 (21:11 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52199 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/wincmn.cpp

index 00c3b8934126a24bf29a943125336a88c907a3b0..a9e3999fcc642e3c896d64628e6b0efb33b56bfa 100644 (file)
@@ -369,6 +369,14 @@ wxWindowBase::~wxWindowBase()
 #if wxUSE_ACCESSIBILITY
     delete m_accessible;
 #endif
+
+#if wxUSE_HELP
+    // NB: this has to be called unconditionally, because we don't know
+    //     whether this window has associated help text or not
+    wxHelpProvider *helpProvider = wxHelpProvider::Get();
+    if ( helpProvider )
+        helpProvider->RemoveHelp(this);
+#endif
 }
 
 void wxWindowBase::SendDestroyEvent()