From 0792eb0cb37dfd72be8d795c571ea5eb92f5fc2a Mon Sep 17 00:00:00 2001 From: Steve Daulton Date: Tue, 28 Jul 2015 08:55:31 +0100 Subject: [PATCH] Fix for bug 958 Bug 958 is due to rounding that is not visible to the user. By providing one extra decimal place to the New Peak Amplitude (dB) the user can see if they have exceeded 0 dB by a small amount. --- src/effects/Amplify.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/effects/Amplify.cpp b/src/effects/Amplify.cpp index 096364bfc..dc2e73d73 100644 --- a/src/effects/Amplify.cpp +++ b/src/effects/Amplify.cpp @@ -211,7 +211,7 @@ void EffectAmplify::PopulateOrExchange(ShuttleGui & S) S.StartVerticalLay(0); { - int precission = 3; + int precission = 3; // allow (a generous) 3 decimal places for Amplification (dB) // Amplitude S.StartMultiColumn(2, wxCENTER); { @@ -234,7 +234,8 @@ void EffectAmplify::PopulateOrExchange(ShuttleGui & S) // Peak S.StartMultiColumn(2, wxCENTER); { - FloatingPointValidator vldNewPeak(precission, &mNewPeak, NUM_VAL_ONE_TRAILING_ZERO); + // One extra decimal place so that rounding is visible to user (see: bug 958) + FloatingPointValidator vldNewPeak(precission + 1, &mNewPeak, NUM_VAL_ONE_TRAILING_ZERO); double minAmp = MIN_Amp + LINEAR_TO_DB(mPeak); double maxAmp = MAX_Amp + LINEAR_TO_DB(mPeak);