From 0cb5718761aaa2d592c0dc92a3c81cf3dde9f6da Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 12 May 2006 20:17:40 +0000 Subject: [PATCH] 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 --- src/common/wincmn.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 6b903252e1..45f341c2e2 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -1527,10 +1527,13 @@ void wxWindowBase::SetToolTip( const wxString &tip ) void wxWindowBase::DoSetToolTip(wxToolTip *tooltip) { - if ( m_tooltip ) - delete m_tooltip; + if ( m_tooltip != tooltip ) + { + if ( m_tooltip ) + delete m_tooltip; - m_tooltip = tooltip; + m_tooltip = tooltip; + } } #endif // wxUSE_TOOLTIPS -- 2.47.2