]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/classic/spinbutt.cpp
Compilation fix.
[wxWidgets.git] / src / mac / classic / spinbutt.cpp
index 3d1cd44c21e6be82d4d4851c4cec90bfbed03e41..08e6da47fa64cde7bfaa4ef141400b042bb46b8f 100644 (file)
 // 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 +84,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)