Don't decrease the number of digits implicitly
wxSpinCtrlDouble::SetIncrement() should increase the number of digits if necessary because not doing it would be inconsistent with the initial determination of the number of digits in the ctor and would actually lose the digits displayed, but it seems unnecessary to decrease the number of digits and it might be surprising, so don't do it. Add a test for this behaviour and document it.
This commit is contained in:
@@ -354,8 +354,15 @@ public:
|
||||
|
||||
/**
|
||||
Sets the increment value.
|
||||
@note You may also need to change the precision of the value
|
||||
using SetDigits().
|
||||
|
||||
Using this method changes the number of digits used by the control to
|
||||
at least match the value of @a inc, e.g. using the increment of @c 0.01
|
||||
sets the number of digits to 2 if it had been less than 2 before.
|
||||
However it doesn't change the number of digits if it had been already
|
||||
high enough.
|
||||
|
||||
In any case, you may call SetDigits() explicitly to override the
|
||||
automatic determination of the number of digits.
|
||||
*/
|
||||
void SetIncrement(double inc);
|
||||
|
||||
|
Reference in New Issue
Block a user