Browse Source

Call ParamQuantity::getDefaultValue() in configParam() to set initial value of param.

tags/v2.0.0
Andrew Belt 5 years ago
parent
commit
d11223d0e0
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      include/engine/Module.hpp

+ 3
- 3
include/engine/Module.hpp View File

@@ -101,9 +101,6 @@ struct Module {
if (paramQuantities[paramId])
delete paramQuantities[paramId];

Param* p = &params[paramId];
p->value = defaultValue;

ParamQuantity* q = new TParamQuantity;
q->module = this;
q->paramId = paramId;
@@ -116,6 +113,9 @@ struct Module {
q->displayMultiplier = displayMultiplier;
q->displayOffset = displayOffset;
paramQuantities[paramId] = q;

Param* p = &params[paramId];
p->value = q->getDefaultValue();
}

template <class TPortInfo = PortInfo>


Loading…
Cancel
Save