Added Delete member to wxStringHashTable in order to implement
wxHelpProvider::RemoveHelp, which is now called from ~wxWindowBase. Without cleaning up the hash tables, reused window addresses will cause the CS help to fail rather comically over time. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -301,6 +301,11 @@ void wxHelpProvider::AddHelp(wxWindowID WXUNUSED(id),
|
||||
{
|
||||
}
|
||||
|
||||
// removes the association
|
||||
void wxHelpProvider::RemoveHelp(wxWindowBase* WXUNUSED(window))
|
||||
{
|
||||
}
|
||||
|
||||
wxHelpProvider::~wxHelpProvider()
|
||||
{
|
||||
}
|
||||
@@ -329,6 +334,12 @@ void wxSimpleHelpProvider::AddHelp(wxWindowID id, const wxString& text)
|
||||
m_hashIds.Put(id, text);
|
||||
}
|
||||
|
||||
// removes the association
|
||||
void wxSimpleHelpProvider::RemoveHelp(wxWindowBase* window)
|
||||
{
|
||||
m_hashWindows.Delete((long)window);
|
||||
}
|
||||
|
||||
bool wxSimpleHelpProvider::ShowHelp(wxWindowBase *window)
|
||||
{
|
||||
#if wxUSE_TIPWINDOW
|
||||
|
Reference in New Issue
Block a user