X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a54b0880d6cd23fada85e555d231f994646d11c0..92980e9076469956e1e2cb94df97d0f8d873114a:/src/mac/spinbutt.cpp?ds=inline diff --git a/src/mac/spinbutt.cpp b/src/mac/spinbutt.cpp index f744cb2b0a..fd9d5d4e47 100644 --- a/src/mac/spinbutt.cpp +++ b/src/mac/spinbutt.cpp @@ -83,7 +83,7 @@ int wxSpinButton::GetValue() const void wxSpinButton::SetValue(int val) { - MacHandleValueChanged( val - m_value ) ; + m_value = val ; } void wxSpinButton::SetRange(int minVal, int maxVal) @@ -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 ;