Also check for range on Mac's spin controls.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31166 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -87,7 +87,12 @@ int wxSpinButton::GetMax() const
|
||||
|
||||
int wxSpinButton::GetValue() const
|
||||
{
|
||||
return m_value;
|
||||
int n = m_value;
|
||||
|
||||
if (n < m_min) n = m_min;
|
||||
if (n > m_max) n = m_max;
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
void wxSpinButton::SetValue(int val)
|
||||
|
@@ -86,7 +86,12 @@ int wxSpinButton::GetMax() const
|
||||
|
||||
int wxSpinButton::GetValue() const
|
||||
{
|
||||
return m_value;
|
||||
int n = m_value;
|
||||
|
||||
if (n < m_min) n = m_min;
|
||||
if (n > m_max) n = m_max;
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
void wxSpinButton::SetValue(int val)
|
||||
|
Reference in New Issue
Block a user