From 5f133dc1bb15573c56f9f1fade8c48aa17838c38 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 27 Dec 2002 15:21:34 +0000 Subject: [PATCH] Applied patch [ 657501 ] SpinButton wraps 1 too much git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/spinbutt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/univ/spinbutt.cpp b/src/univ/spinbutt.cpp index 07808d336a..08edc83639 100644 --- a/src/univ/spinbutt.cpp +++ b/src/univ/spinbutt.cpp @@ -144,14 +144,14 @@ int wxSpinButton::NormalizeValue(int value) const if ( value > m_max ) { if ( GetWindowStyleFlag() & wxSP_WRAP ) - value = m_min + (value - m_max) % (m_max - m_min); + value = m_min + (value - m_max - 1) % (m_max - m_min + 1); else value = m_max; } else if ( value < m_min ) { if ( GetWindowStyleFlag() & wxSP_WRAP ) - value = m_max - (m_min - value) % (m_max - m_min); + value = m_max - (m_min - value - 1) % (m_max - m_min + 1); else value = m_min; }