Browse Source

Allow ParamQuantity::displayMultiplier to be 0.

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
7cb85d543c
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      src/engine/ParamQuantity.cpp

+ 5
- 1
src/engine/ParamQuantity.cpp View File

@@ -72,7 +72,11 @@ float ParamQuantity::getDisplayValue() {
void ParamQuantity::setDisplayValue(float displayValue) {
if (!module)
return;
float v = (displayValue - displayOffset) / displayMultiplier;
float v = displayValue - displayOffset;
if (displayMultiplier == 0.f)
v = 0.f;
else
v /= displayMultiplier;
if (displayBase == 0.f) {
// Linear
// v is unchanged


Loading…
Cancel
Save