X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a54b0880d6cd23fada85e555d231f994646d11c0..2beae4b5a5785cdf89af79383e062fbe9540b663:/src/mac/spinbutt.cpp diff --git a/src/mac/spinbutt.cpp b/src/mac/spinbutt.cpp index f744cb2b0a..08151678ac 100644 --- a/src/mac/spinbutt.cpp +++ b/src/mac/spinbutt.cpp @@ -83,15 +83,15 @@ int wxSpinButton::GetValue() const void wxSpinButton::SetValue(int val) { - MacHandleValueChanged( val - m_value ) ; + m_value = val ; } void wxSpinButton::SetRange(int minVal, int maxVal) { m_min = minVal; m_max = maxVal; - SetControlMaximum( (ControlHandle) m_macControl , maxVal ) ; - SetControlMinimum((ControlHandle) m_macControl , minVal ) ; + SetControl32BitMaximum( (ControlHandle) m_macControl , maxVal ) ; + SetControl32BitMinimum((ControlHandle) m_macControl , minVal ) ; } void wxSpinButton::MacHandleValueChanged( int inc ) @@ -118,9 +118,9 @@ void wxSpinButton::MacHandleValueChanged( int inc ) m_value = m_max; } - if ( oldValue - m_value == -1 ) + if ( m_value - oldValue == -1 ) scrollEvent = wxEVT_SCROLL_LINEDOWN ; - else if ( oldValue - m_value == 1 ) + else if ( m_value - oldValue == 1 ) scrollEvent = wxEVT_SCROLL_LINEUP ; else scrollEvent = wxEVT_SCROLL_THUMBTRACK ; @@ -134,7 +134,7 @@ void wxSpinButton::MacHandleValueChanged( int inc ) { m_value = oldValue ; } - SetControlValue( (ControlHandle) m_macControl , m_value ) ; + SetControl32BitValue( (ControlHandle) m_macControl , m_value ) ; /* always send a thumbtrack event */ if (scrollEvent != wxEVT_SCROLL_THUMBTRACK)