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
This commit is contained in:
parent
16990160f6
commit
5f133dc1bb
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user