Always initialize m_format in DetermineDigits()

It doesn't seem right to leave it unchanged when increment is outside of
[0, 1] interval, we should still set it to something in this case.

And doing this makes it unnecessary and redundant to initialize m_format
in Init(), as it will be always done when DetermineDigits() is called
from Create() anyhow.
This commit is contained in:
Vadim Zeitlin
2021-04-25 19:13:22 +01:00
parent e748c2b56c
commit e2d2b367af
2 changed files with 6 additions and 2 deletions

View File

@@ -424,7 +424,6 @@ private:
void Init()
{
m_digits = 0;
m_format = wxASCII_STR("%0.0f");
}
// Update m_digits and m_format to correspond to the given increment.