fixed ~wxWindowBase to remove associated context help from wxHelpProvider -- otherwise wrong help text could be reused by other controls later
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@52200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -117,6 +117,7 @@ All (GUI):
|
|||||||
and hiding cell cursor when it doesn't have focus.
|
and hiding cell cursor when it doesn't have focus.
|
||||||
- Added alpha support to wxImage::Paste() (Steven Van Ingelgem)
|
- Added alpha support to wxImage::Paste() (Steven Van Ingelgem)
|
||||||
- Use current date when opening popup in generic wxDatePickerCtrl.
|
- Use current date when opening popup in generic wxDatePickerCtrl.
|
||||||
|
- Remove associated help text from wxHelpProvider when a window is destroyed.
|
||||||
|
|
||||||
All (Unix):
|
All (Unix):
|
||||||
|
|
||||||
|
@@ -69,11 +69,16 @@ the window.
|
|||||||
|
|
||||||
\func{virtual void}{RemoveHelp}{\param{wxWindowBase* }{window}}
|
\func{virtual void}{RemoveHelp}{\param{wxWindowBase* }{window}}
|
||||||
|
|
||||||
Removes the association between the window pointer and the help text. This is
|
Removes the association between the window pointer and the help text, if it
|
||||||
|
was previously set using \helpref{AddHelp}{wxhelpprovideraddhelp}. This is
|
||||||
called by the wxWindow destructor. Without this, the table of help strings will
|
called by the wxWindow destructor. Without this, the table of help strings will
|
||||||
fill up and when window pointers are reused, the wrong help string will be
|
fill up and when window pointers are reused, the wrong help string will be
|
||||||
found.
|
found.
|
||||||
|
|
||||||
|
Note that this method may be called even for windows that don't have any
|
||||||
|
associated help text. If that happens, its implementation should simply do
|
||||||
|
nothing.
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxHelpProvider::Set}\label{wxhelpproviderset}
|
\membersection{wxHelpProvider::Set}\label{wxhelpproviderset}
|
||||||
|
|
||||||
|
@@ -392,6 +392,14 @@ wxWindowBase::~wxWindowBase()
|
|||||||
#if wxUSE_ACCESSIBILITY
|
#if wxUSE_ACCESSIBILITY
|
||||||
delete m_accessible;
|
delete m_accessible;
|
||||||
#endif
|
#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()
|
void wxWindowBase::SendDestroyEvent()
|
||||||
|
Reference in New Issue
Block a user