From ff9c29d18904619baa0fa94db35868175ea883c3 Mon Sep 17 00:00:00 2001 From: regulus79 <117475203+regulus79@users.noreply.github.com> Date: Sat, 7 Feb 2026 13:57:00 -0500 Subject: [PATCH] Fix Hardcoded Max dB Value When Double-Clicking Knobs (#8189) Partially addresses #8188 For some reason, when a knob is set to be a "volume knob", the max volume allowed via double-clicking and typing in a value is 6.0 dB. For knobs such as the amplifier knob in Audio File Processor which go up to 500% (~14 db), this is not enough. This PR makes it so that the dialog shows the actual max dB value based on the underlying model's max value, instead of being hardcoded to 6.0 dB. This PR does not address the minimum value. --- src/gui/widgets/FloatModelEditorBase.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/widgets/FloatModelEditorBase.cpp b/src/gui/widgets/FloatModelEditorBase.cpp index 0f3a513c0..2fe62f499 100644 --- a/src/gui/widgets/FloatModelEditorBase.cpp +++ b/src/gui/widgets/FloatModelEditorBase.cpp @@ -387,9 +387,8 @@ void FloatModelEditorBase::enterValue() new_val = QInputDialog::getDouble( this, tr("Set value"), - tr("Please enter a new value between " - "-96.0 dBFS and 6.0 dBFS:"), - initialDbValue, -96.0, 6.0, model()->getDigitCount(), &ok); + tr("Please enter a new value between -96.0 dBFS and %1 dBFS:").arg(ampToDbfs(model()->maxValue() / 100.0f)), + initialDbValue, -96.0, ampToDbfs(model()->maxValue() / 100.0f), model()->getDigitCount(), &ok); if (new_val <= -96.0) {