git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74236
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
wxCHECK_MSG( m_textCtrl, false, wxT("invalid call to wxSpinCtrl::SetValue") );
- if (!InRange(val))
- return false;
-
+ if ( val < m_min )
+ val = m_min;
+ if ( val > m_max )
+ val = m_max;
+
if ( m_snap_to_ticks && (m_increment != 0) )
{
double snap_value = val / m_increment;
void wxSpinCtrlGenericBase::DoSetRange(double min, double max)
{
m_min = min;
+ if ( m_value < m_min )
+ DoSetValue(m_min);
m_max = max;
+ if ( m_value > m_max )
+ DoSetValue(m_max);
}
void wxSpinCtrlGenericBase::DoSetIncrement(double inc)