X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/312ebad4cd1fad97a79aaed7102611df88806410..90e572f1e5af1e51fd14e2e1e6f64fa3e258e590:/src/mac/classic/spinbutt.cpp?ds=sidebyside diff --git a/src/mac/classic/spinbutt.cpp b/src/mac/classic/spinbutt.cpp index 3d1cd44c21..5471cc8b14 100644 --- a/src/mac/classic/spinbutt.cpp +++ b/src/mac/classic/spinbutt.cpp @@ -9,11 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "spinbutt.h" -#pragma implementation "spinbuttbase.h" -#endif - #include "wx/defs.h" #if wxUSE_SPINBTN @@ -29,10 +24,8 @@ // wxWin macros // ---------------------------------------------------------------------------- -#if !USE_SHARED_LIBRARY - IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl) - IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent) -#endif +IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent) wxSpinButton::wxSpinButton() : wxSpinButtonBase() @@ -86,7 +79,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)