X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/43524b1583cbe798351fef03242f0990e1cfddc2..c944775f72435d2c0493113e05445898ab8baf1b:/src/mac/carbon/spinbutt.cpp?ds=sidebyside diff --git a/src/mac/carbon/spinbutt.cpp b/src/mac/carbon/spinbutt.cpp index 560ab64352..850e708252 100644 --- a/src/mac/carbon/spinbutt.cpp +++ b/src/mac/carbon/spinbutt.cpp @@ -124,6 +124,11 @@ void wxSpinButton::MacHandleValueChanged( int inc ) else scrollEvent = wxEVT_SCROLL_THUMBTRACK; + // Do not send an event if the value has not actually changed + // (Also works for wxSpinCtrl) + if ( m_value == oldValue ) + return; + wxSpinEvent event( scrollEvent, m_windowId ); event.SetPosition( m_value ); @@ -144,7 +149,9 @@ void wxSpinButton::MacHandleValueChanged( int inc ) } } -void wxSpinButton::MacHandleControlClick( WXWidget control, wxInt16 controlpart, bool mouseStillDown ) +void wxSpinButton::MacHandleControlClick(WXWidget WXUNUSED(control), + wxInt16 controlpart, + bool WXUNUSED(mouseStillDown)) { int nScrollInc = 0; @@ -165,7 +172,8 @@ void wxSpinButton::MacHandleControlClick( WXWidget control, wxInt16 controlpart, MacHandleValueChanged( nScrollInc ) ; } -wxInt32 wxSpinButton::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTREF event ) +wxInt32 wxSpinButton::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler), + WXEVENTREF WXUNUSED(event)) { #if 0 // these have been handled by the live action proc already