X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76a5e5d21ee1a6230d777ce0209b2df4c6075f0f..bd330a69c9555c29c6fc448a61e58e0d49402c47:/src/mac/tooltip.cpp?ds=sidebyside diff --git a/src/mac/tooltip.cpp b/src/mac/tooltip.cpp index 0655699087..0d1e1ce955 100644 --- a/src/mac/tooltip.cpp +++ b/src/mac/tooltip.cpp @@ -55,15 +55,15 @@ class wxMacToolTip class wxMacToolTipTimer : wxTimer { public: + wxMacToolTipTimer() {} ; wxMacToolTipTimer(wxMacToolTip* tip, int iMilliseconds) ; - + virtual ~wxMacToolTipTimer() {} ; void Notify() { if ( m_mark == m_tip->GetMark() ) m_tip->Draw() ; } - protected: wxMacToolTip* m_tip; long m_mark ; @@ -187,7 +187,7 @@ void wxMacToolTip::Setup( WindowRef window , wxString text , wxPoint localPosit { m_mark++ ; Clear() ; - m_position = localPosition ; + m_position = localPosition ; m_label = wxMacMakeMacStringFromPC( text ) ; m_window = window ; s_ToolTipWindowRef = window ; @@ -225,7 +225,7 @@ void wxMacToolTip::Draw() */ #endif { - wxMacPortStateHelper help( GetWindowPort( m_window ) ); + wxMacPortStateHelper help( (GrafPtr) GetWindowPort( m_window ) ); m_shown = true ; @@ -323,12 +323,17 @@ void wxToolTip::NotifyWindowDelete( WXHWND win ) void wxMacToolTip::Clear() { m_mark++ ; + if ( m_timer ) + { + delete m_timer ; + m_timer = NULL ; + } if ( !m_shown ) return ; if ( m_window == s_ToolTipWindowRef && m_backpict ) { - wxMacPortStateHelper help( GetWindowPort(m_window) ) ; + wxMacPortStateHelper help( (GrafPtr) GetWindowPort(m_window) ) ; m_shown = false ;