]> git.saurik.com Git - wxWidgets.git/commitdiff
wxSpinCtrl values are always integral, they don't need to be rounded
authorPaul Cornett <paulcor@bullseye.com>
Tue, 10 Nov 2009 17:36:53 +0000 (17:36 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Tue, 10 Nov 2009 17:36:53 +0000 (17:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/spinctlg.h
include/wx/gtk/spinctrl.h
src/gtk/spinctrl.cpp

index 9c18c06a6b2cd79722cb81beb83b78f5a676f3f3..41fc00cb1b339980c2373f9fe19971dcd4b8ed6f 100644 (file)
@@ -264,11 +264,10 @@ public:
     }
 
     // accessors
-    int GetValue(wxSPINCTRL_GETVALUE_FIX) const
-        { return wxRound( DoGetValue() ); }
-    int GetMin() const       { return wxRound( m_min ); }
-    int GetMax() const       { return wxRound( m_max ); }
-    int GetIncrement() const { return wxRound( m_increment ); }
+    int GetValue(wxSPINCTRL_GETVALUE_FIX) const { return int(DoGetValue()); }
+    int GetMin() const { return int(m_min); }
+    int GetMax() const { return int(m_max); }
+    int GetIncrement() const { return int(m_increment); }
 
     // operations
     void SetValue(const wxString& value)
index 39dc35089b6af8a00b0c08d96340670651882c10..f9924ed224cf37bf7019122fd35c91b42c6794e9 100644 (file)
@@ -117,10 +117,10 @@ public:
     }
 
     // accessors
-    int GetValue() const     { return wxRound( DoGetValue() ); }
-    int GetMin() const       { return wxRound( DoGetMin() ); }
-    int GetMax() const       { return wxRound( DoGetMax() ); }
-    int GetIncrement() const { return wxRound( DoGetIncrement() ); }
+    int GetValue() const { return int(DoGetValue()); }
+    int GetMin() const { return int(DoGetMin()); }
+    int GetMax() const { return int(DoGetMax()); }
+    int GetIncrement() const { return int(DoGetIncrement()); }
 
     // operations
     void SetValue(const wxString& value)    { wxSpinCtrlGTKBase::SetValue(value); } // visibility problem w/ gcc
index bae8e7ea5b27b68dd9e4b3d26c9359591a5cfc11..6ba4071d2833e7138ea2d65eba3dc7d927ca66d3 100644 (file)
@@ -218,9 +218,6 @@ void wxSpinCtrlGTKBase::DoSetValue( double value )
 {
     wxCHECK_RET( (m_widget != NULL), wxT("invalid spin button") );
 
-    if (wxIsKindOf(this, wxSpinCtrl))
-        value = wxRound( value );
-
     GtkDisableEvents();
     gtk_spin_button_set_value( GTK_SPIN_BUTTON(m_widget), value);
     GtkEnableEvents();