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:
@@ -124,6 +124,9 @@ public:
|
||||
// the application, for example)
|
||||
virtual void AddHelp(wxWindowID id, const wxString& text);
|
||||
|
||||
// removes the association
|
||||
virtual void RemoveHelp(wxWindowBase* window);
|
||||
|
||||
// virtual dtor for any base class
|
||||
virtual ~wxHelpProvider();
|
||||
|
||||
@@ -142,6 +145,7 @@ public:
|
||||
virtual bool ShowHelp(wxWindowBase *window);
|
||||
virtual void AddHelp(wxWindowBase *window, const wxString& text);
|
||||
virtual void AddHelp(wxWindowID id, const wxString& text);
|
||||
virtual void RemoveHelp(wxWindowBase* window);
|
||||
|
||||
protected:
|
||||
// we use 2 hashes for storing the help strings associated with windows
|
||||
|
@@ -127,6 +127,9 @@ public:
|
||||
// and the wasFound is set to FALSE if not NULL
|
||||
wxString Get(long key, bool *wasFound = NULL) const;
|
||||
|
||||
// remove the item, returning TRUE if the item was found and deleted
|
||||
bool Delete(long key) const;
|
||||
|
||||
// clean up
|
||||
void Destroy();
|
||||
|
||||
|
Reference in New Issue
Block a user