don't delete the exiting tooltip if SetToolTip() is called with the same one
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1527,10 +1527,13 @@ void wxWindowBase::SetToolTip( const wxString &tip )
|
|||||||
|
|
||||||
void wxWindowBase::DoSetToolTip(wxToolTip *tooltip)
|
void wxWindowBase::DoSetToolTip(wxToolTip *tooltip)
|
||||||
{
|
{
|
||||||
if ( m_tooltip )
|
if ( m_tooltip != tooltip )
|
||||||
delete m_tooltip;
|
{
|
||||||
|
if ( m_tooltip )
|
||||||
|
delete m_tooltip;
|
||||||
|
|
||||||
m_tooltip = tooltip;
|
m_tooltip = tooltip;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
|
Reference in New Issue
Block a user