]> git.saurik.com Git - wxWidgets.git/commitdiff
don't delete the exiting tooltip if SetToolTip() is called with the same one
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 12 May 2006 20:17:40 +0000 (20:17 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 12 May 2006 20:17:40 +0000 (20:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/wincmn.cpp

index 6b903252e1fd2e868af6d63c6e83e38a13d859be..45f341c2e208602238ca1203c4aacd8db2d50087 100644 (file)
@@ -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