]> git.saurik.com Git - wxWidgets.git/commitdiff
bug fixes
authorStefan Csomor <csomor@advancedconcepts.ch>
Mon, 10 Feb 2003 19:15:13 +0000 (19:15 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Mon, 10 Feb 2003 19:15:13 +0000 (19:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/tooltip.cpp
src/mac/tooltip.cpp

index 1dfb2dfb1420e7192f8d0ef336c3550a882082a1..5d072cb098cf8a45ad64630dabe311c1e63700a9 100644 (file)
@@ -240,12 +240,15 @@ void wxMacToolTip::Draw()
                LocalToGlobal( (Point *) &tag.absHotRect.bottom );
                SetPort( port );
                if( m_helpTextRef )
-                       CFRelease( m_helpTextRef )
+               {
+                       CFRelease( m_helpTextRef ) ;
+                       m_helpTextRef = NULL ;
+               }
                m_helpTextRef = wxMacCreateCFString(m_label) ;
                tag.content[kHMMinimumContentIndex].contentType = kHMCFStringContent ;
-               tag.content[kHMMinimumContentIndex].u.tagCFString = text ;
+               tag.content[kHMMinimumContentIndex].u.tagCFString = m_helpTextRef ;
                tag.content[kHMMaximumContentIndex].contentType = kHMCFStringContent ;
-               tag.content[kHMMaximumContentIndex].u.tagCFString = text ;
+               tag.content[kHMMaximumContentIndex].u.tagCFString = m_helpTextRef ;
                tag.tagSide = kHMDefaultSide;
                HMDisplayTag( &tag );
          }
@@ -452,7 +455,10 @@ void wxMacToolTip::Clear()
 #if TARGET_CARBON
        HMHideTag() ;
        if( m_helpTextRef )
-               CFRelease( m_helpTextRef )
+       {
+               CFRelease( m_helpTextRef ) ;
+               m_helpTextRef = NULL ;
+       }
 #else           
        if ( m_window == s_ToolTipWindowRef && m_backpict )
        {
index 1dfb2dfb1420e7192f8d0ef336c3550a882082a1..5d072cb098cf8a45ad64630dabe311c1e63700a9 100644 (file)
@@ -240,12 +240,15 @@ void wxMacToolTip::Draw()
                LocalToGlobal( (Point *) &tag.absHotRect.bottom );
                SetPort( port );
                if( m_helpTextRef )
-                       CFRelease( m_helpTextRef )
+               {
+                       CFRelease( m_helpTextRef ) ;
+                       m_helpTextRef = NULL ;
+               }
                m_helpTextRef = wxMacCreateCFString(m_label) ;
                tag.content[kHMMinimumContentIndex].contentType = kHMCFStringContent ;
-               tag.content[kHMMinimumContentIndex].u.tagCFString = text ;
+               tag.content[kHMMinimumContentIndex].u.tagCFString = m_helpTextRef ;
                tag.content[kHMMaximumContentIndex].contentType = kHMCFStringContent ;
-               tag.content[kHMMaximumContentIndex].u.tagCFString = text ;
+               tag.content[kHMMaximumContentIndex].u.tagCFString = m_helpTextRef ;
                tag.tagSide = kHMDefaultSide;
                HMDisplayTag( &tag );
          }
@@ -452,7 +455,10 @@ void wxMacToolTip::Clear()
 #if TARGET_CARBON
        HMHideTag() ;
        if( m_helpTextRef )
-               CFRelease( m_helpTextRef )
+       {
+               CFRelease( m_helpTextRef ) ;
+               m_helpTextRef = NULL ;
+       }
 #else           
        if ( m_window == s_ToolTipWindowRef && m_backpict )
        {