Determine initial wxSpinCtrlDouble precision
For native wxGTK implementation default spin control precision is derived from the precision of the increment value. Fot the sake of consistency the same should be done in the generic implementation. Closes #18764.
This commit is contained in:
@@ -380,6 +380,7 @@ public:
|
||||
double inc = 1,
|
||||
const wxString& name = wxT("wxSpinCtrlDouble"))
|
||||
{
|
||||
DetermineDigits(inc);
|
||||
return wxSpinCtrlGenericBase::Create(parent, id, value, pos, size,
|
||||
style, min, max, initial,
|
||||
inc, name);
|
||||
@@ -410,6 +411,7 @@ protected:
|
||||
|
||||
virtual bool DoTextToValue(const wxString& text, double *val) wxOVERRIDE;
|
||||
virtual wxString DoValueToText(double val) wxOVERRIDE;
|
||||
void DetermineDigits(double inc);
|
||||
|
||||
unsigned m_digits;
|
||||
|
||||
|
Reference in New Issue
Block a user