wxSpinCtrl values are always integral, they don't need to be rounded
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -264,11 +264,10 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
int GetValue(wxSPINCTRL_GETVALUE_FIX) const
|
int GetValue(wxSPINCTRL_GETVALUE_FIX) const { return int(DoGetValue()); }
|
||||||
{ return wxRound( DoGetValue() ); }
|
int GetMin() const { return int(m_min); }
|
||||||
int GetMin() const { return wxRound( m_min ); }
|
int GetMax() const { return int(m_max); }
|
||||||
int GetMax() const { return wxRound( m_max ); }
|
int GetIncrement() const { return int(m_increment); }
|
||||||
int GetIncrement() const { return wxRound( m_increment ); }
|
|
||||||
|
|
||||||
// operations
|
// operations
|
||||||
void SetValue(const wxString& value)
|
void SetValue(const wxString& value)
|
||||||
|
@@ -117,10 +117,10 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
int GetValue() const { return wxRound( DoGetValue() ); }
|
int GetValue() const { return int(DoGetValue()); }
|
||||||
int GetMin() const { return wxRound( DoGetMin() ); }
|
int GetMin() const { return int(DoGetMin()); }
|
||||||
int GetMax() const { return wxRound( DoGetMax() ); }
|
int GetMax() const { return int(DoGetMax()); }
|
||||||
int GetIncrement() const { return wxRound( DoGetIncrement() ); }
|
int GetIncrement() const { return int(DoGetIncrement()); }
|
||||||
|
|
||||||
// operations
|
// operations
|
||||||
void SetValue(const wxString& value) { wxSpinCtrlGTKBase::SetValue(value); } // visibility problem w/ gcc
|
void SetValue(const wxString& value) { wxSpinCtrlGTKBase::SetValue(value); } // visibility problem w/ gcc
|
||||||
|
@@ -218,9 +218,6 @@ void wxSpinCtrlGTKBase::DoSetValue( double value )
|
|||||||
{
|
{
|
||||||
wxCHECK_RET( (m_widget != NULL), wxT("invalid spin button") );
|
wxCHECK_RET( (m_widget != NULL), wxT("invalid spin button") );
|
||||||
|
|
||||||
if (wxIsKindOf(this, wxSpinCtrl))
|
|
||||||
value = wxRound( value );
|
|
||||||
|
|
||||||
GtkDisableEvents();
|
GtkDisableEvents();
|
||||||
gtk_spin_button_set_value( GTK_SPIN_BUTTON(m_widget), value);
|
gtk_spin_button_set_value( GTK_SPIN_BUTTON(m_widget), value);
|
||||||
GtkEnableEvents();
|
GtkEnableEvents();
|
||||||
|
Reference in New Issue
Block a user