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:
Artur Wieczorek
2020-05-18 18:52:41 +02:00
parent a2a3897124
commit c963c60a0f
2 changed files with 15 additions and 1 deletions

View File

@@ -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;