1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-23 23:03:55 +02:00

Use an enum class for numeric validator styles

This commit is contained in:
Paul Licameli
2017-10-30 12:18:10 -04:00
parent cad632b9b0
commit 6e7d7447c1
21 changed files with 97 additions and 91 deletions

View File

@@ -304,13 +304,13 @@ void EffectChangeSpeed::PopulateOrExchange(ShuttleGui & S)
// Speed multiplier and percent change controls.
S.StartMultiColumn(4, wxCENTER);
{
FloatingPointValidator<double> vldMultiplier(3, &mMultiplier, NUM_VAL_THREE_TRAILING_ZEROES);
FloatingPointValidator<double> vldMultiplier(3, &mMultiplier, NumValidatorStyle::THREE_TRAILING_ZEROES);
vldMultiplier.SetRange(MIN_Percentage / 100.0, ((MAX_Percentage / 100.0) + 1));
mpTextCtrl_Multiplier =
S.Id(ID_Multiplier).AddTextBox(_("Speed Multiplier:"), wxT(""), 12);
mpTextCtrl_Multiplier->SetValidator(vldMultiplier);
FloatingPointValidator<double> vldPercentage(3, &m_PercentChange, NUM_VAL_THREE_TRAILING_ZEROES);
FloatingPointValidator<double> vldPercentage(3, &m_PercentChange, NumValidatorStyle::THREE_TRAILING_ZEROES);
vldPercentage.SetRange(MIN_Percentage, MAX_Percentage);
mpTextCtrl_PercentChange =
S.Id(ID_PercentChange).AddTextBox(_("Percent Change:"), wxT(""), 12);